diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index efaa94c29..a501708d4 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -57,7 +57,20 @@ jobs: # pre-commit run --all-files --verbose --show-diff-on-failure - name: Run unit tests run: | - pytest --cov=bilby --durations 10 + pytest --cov=bilby --cov-report=xml --cov-report=term --durations 10 - name: Run sampler tests run: | pytest test/integration/sampler_run_test.py --durations 10 -v + - name: Generate coverage badge + if: matrix.python.short-version == '312' #&& github.ref == 'refs/heads/main' + run: | + source $CONDA_PATH/bin/activate python${{ matrix.python.short-version }} + pip install coverage-badge + coverage-badge -o coverage.svg + shell: bash + - name: Upload coverage badge as artifact + if: matrix.python.short-version == '312' #&& github.ref == 'refs/heads/main' + uses: actions/upload-artifact@v4 + with: + name: coverage-badge + path: coverage.svg diff --git a/README.rst b/README.rst index 714445f09..2e98b652d 100644 --- a/README.rst +++ b/README.rst @@ -34,8 +34,8 @@ Please refer to the `Acknowledging/citing bilby guide