Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 16 additions & 44 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,22 @@ jobs:
exit 1
fi

- name: Generate coverage XML
if: always()
run: |
uv run coverage xml --rcfile=.coveragerc

- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
with:
files: ./coverage.xml
flags: python-${{ matrix.python-version }}
env_vars: MATRIX_TEST
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
MATRIX_TEST: ${{ matrix.test }}

- name: remove slashes from test name
run: |
test=$(echo ${{ matrix.test }} | sed 's/\//__/g')
Expand All @@ -126,47 +142,3 @@ jobs:
include-hidden-files: true
name: Snapshot Report ${{ env.test }}
path: ./snapshot_report.html

- name: Upload coverage
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
include-hidden-files: true
name: coverage_py${{ matrix.python-version }}_${{ env.test }}
path: .coverage

coverage:
needs: test
runs-on:
- runs-on=${{ github.run_id }}-coverage
- runner=2cpu-linux-x64
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
- name: Set up Python 3.14
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
with:
python-version: "3.14"

- name: Install coverage
run: pip install coverage

- name: move coveragerc file up
run: |
mv .github/.coveragerc .

- name: Download all artifacts
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
pattern: coverage_*

- name: Run coverage
run: |
coverage combine --keep coverage_*/.coverage*
coverage report
coverage xml

- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
with:
files: coverage.xml
disable_search: true # we already know the file to upload
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Switch from pre-commit to prek for pre-commit hooks in development([#3899](https://github.com/nf-core/tools/pull/3899))
- switch to uv and pyproject.toml ([#3925](https://github.com/nf-core/tools/pull/3925))
- Pin j178/prek-action action to 91fd7d7 ([#3931](https://github.com/nf-core/tools/pull/3931))
- Simplify coverage reporting in pytest.yml ([#3934](https://github.com/nf-core/tools/pull/3934))
- add pre-commit hook to keep uv.lock in sync ([#3933](https://github.com/nf-core/tools/pull/3933))

### Template
Expand Down
Loading