Repository: popsim-consortium/stdpopsim (language: python)

Issue:
CI tests should run in verbose mode
This would make it much easier to track down problems like the OOM issue seen in #1216.


Discussion / hints:

Fix patch:
diff --git a/.circleci/config.yml b/.circleci/config.yml
deleted file mode 100644
index 7f5eb83fb..000000000
--- a/.circleci/config.yml
+++ /dev/null
@@ -1,170 +0,0 @@
-version: 2.1
-
-orbs:
-  codecov: codecov/codecov@1.1.1
-
-aliases:
-  - &container_config
-      docker:
-        - image: circleci/python:3.7-buster
-      working_directory: &working_directory /home/circleci/stdpopsim
-  - &set_py_circleci_own
-    run:
-      name: Set ownership of Python directories
-      command: |
-        sudo chown -R circleci:circleci /usr/local/bin
-        sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages
-
-jobs:
-  build-slim-lib:
-    <<: *container_config
-    environment:
-        TAG_FILE: /tmp/SLiM_tag
-    steps:
-      - run: sudo chown -R circleci:circleci .
-      - run: sudo chown -R circleci:circleci /usr/local/bin
-      - run:
-          name: Check last SLiM tag
-          command: |
-            git clone --bare https://github.com/MesserLab/SLiM /tmp/SLiM_top/SLiM
-            cd /tmp/SLiM_top/SLiM
-            git describe --tags $(git rev-list --tags --max-count=1) > ${TAG_FILE}
-            # Pinning to SLiM 3.7.1; comment out the next line to use latest tag.
-            echo v3.7.1 > ${TAG_FILE}
-            echo Using SLiM version $(cat /tmp/SLiM_tag)
-
-      - restore_cache:
-          key: SLiM-v2-{{ checksum "/tmp/SLiM_tag" }}
-      - run:
-          name: Build and install SLiM
-          command: |
-            if [ ! -f "/usr/local/bin/slim" ]; then
-                sudo apt-get install cmake
-                cd /tmp/SLiM_top
-                mv SLiM .git
-                git config --local --bool core.bare false
-                git reset --hard
-                git checkout $(cat /tmp/SLiM_tag) -b latest
-                mkdir build
-                cd build && cmake .. && make
-                mv slim /usr/local/bin
-            else
-                echo "Cache found!"
-            fi
-      - save_cache:
-          key: SLiM-{{ checksum "/tmp/SLiM_tag" }}-build-0
-          paths:
-            - "/usr/local/bin"
-      - persist_to_workspace:
-          root: /usr/local
-          paths:
-            - bin/slim
-
-  build-deps:
-    <<: *container_config
-    steps:
-      - *set_py_circleci_own
-      - run: sudo chown -R circleci:circleci /usr/local/man/
-      - run: sudo chown -R circleci:circleci /usr/local/share
-      - checkout
-      - run: sudo chown -R circleci:circleci .
-      - restore_cache:
-          key: stdpopsim-v3-{{ .Branch }}-{{ checksum "requirements/CI/requirements.txt" }}
-      - run:
-          name: Install Python dependencies
-          command: |
-            pip install --upgrade setuptools pip wheel twine
-            pip install -r requirements/CI/requirements.txt
-      - save_cache:
-          key: stdpopsim-v3-{{ .Branch }}-{{ checksum "requirements/CI/requirements.txt" }}
-          paths:
-            - "/usr/local/bin"
-            - "/usr/local/lib/python3.7/site-packages"
-      - persist_to_workspace:
-          root: /usr/local
-          paths:
-            - bin/*
-            - lib/python3.7/site-packages/*
-
-  build-pkg:
-    <<: *container_config
-    steps:
-      - *set_py_circleci_own
-      - attach_workspace:
-          at: /usr/local
-      - checkout
-      - run: sudo chown -R circleci:circleci .
-      - run:
-          name: Build Python package
-          command: |
-            python setup.py sdist
-            python setup.py check
-            python -m twine check dist/*.tar.gz
-            python setup.py build_ext
-            python setup.py egg_info
-            python setup.py bdist_wheel
-            pip install dist/*.tar.gz
-            python3 -m stdpopsim -V
-      - run:
-          name: Run a small simulation
-          command: |
-            stdpopsim HomSap -c chr22 -l 0.001 2 > /dev/null
-      - persist_to_workspace:
-          root: /usr/local
-          paths:
-            - bin/stdpopsim
-
-  test:
-    <<: *container_config
-    parallelism: 3
-    steps:
-      - *set_py_circleci_own
-      - attach_workspace:
-          at: /usr/local
-      - checkout
-      - run:
-          name: Run Python tests
-          command: |
-            pytest --cov=stdpopsim -cov-report=term-missing --cov-report=xml \
-              --cov-branch tests
-      - codecov/upload:
-          file: coverage.xml
-      - store_test_results:
-          path: xml
-
-  docs:
-    <<: *container_config
-    steps:
-      - *set_py_circleci_own
-      - attach_workspace:
-          at: /usr/local
-      - checkout
-      - run: sudo chown -R circleci:circleci .
-      - run:
-          name: Rebuild Python package
-          command: |
-            python setup.py sdist bdist_wheel
-            pip install dist/*.tar.gz
-      - run:
-          name: Build docs
-          command: |
-            cd docs
-            make
-            make singlehtml
-
-workflows:
-  version: 2
-  build_and_test:
-    jobs:
-      - build-slim-lib
-      - build-deps
-      - build-pkg:
-          requires:
-            - build-slim-lib
-            - build-deps
-      - test:
-          requires:
-            - build-pkg
-      - docs:
-          requires:
-            - build-pkg
diff --git a/.mergify.yml b/.github/mergify.yml
similarity index 71%
rename from .mergify.yml
rename to .github/mergify.yml
index 8923c3707..242730cbf 100644
--- a/.mergify.yml
+++ b/.github/mergify.yml
@@ -10,11 +10,6 @@ queue_rules:
       - check-success=tests (macos-10.15, 3.10)
       - check-success=tests (windows-latest, 3.7)
       - check-success=tests (windows-latest, 3.10)
-      - "check-success=ci/circleci: build-deps"
-      - "check-success=ci/circleci: build-pkg"
-      - "check-success=ci/circleci: build-slim-lib"
-      - "check-success=ci/circleci: docs"
-      - "check-success=ci/circleci: test"
       - check-success=codecov/patch
       - check-success=codecov/project
 
@@ -32,11 +27,6 @@ pull_request_rules:
       - check-success=tests (macos-10.15, 3.10)
       - check-success=tests (windows-latest, 3.7)
       - check-success=tests (windows-latest, 3.10)
-      - "check-success=ci/circleci: build-deps"
-      - "check-success=ci/circleci: build-pkg"
-      - "check-success=ci/circleci: build-slim-lib"
-      - "check-success=ci/circleci: docs"
-      - "check-success=ci/circleci: test"
       - check-success=codecov/patch
       - check-success=codecov/project
     actions:


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 99de1b396..98aeb688d 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -21,6 +21,8 @@ jobs:
         python: [3.7, "3.10"]
     env:
       CONDA_ENV_NAME: stdpopsim
+      OS: ${{ matrix.os }}
+      PYTHON: ${{ matrix.python }}
 
     steps:
       - name: cancel previous runs
@@ -83,5 +85,17 @@ jobs:
 
       - name: run test suite
         run: |
-          pytest -n0 --cov=stdpopsim --cov-branch tests
-          coverage report -m
+          python -m pytest \
+            -n 0 \
+            -v \
+            --cov=stdpopsim \
+            --cov-branch \
+            --cov-report=term-missing \
+            --cov-report=xml \
+            tests
+
+      - name: upload coverage report to codecov
+        uses: codecov/codecov-action@v3
+        with:
+          fail_ci_if_error: true
+          env_vars: OS,PYTHON