Skip to content

Merge pull request #5 from UMCUGenetics/feature/default-fix-output-fix #53

Merge pull request #5 from UMCUGenetics/feature/default-fix-output-fix

Merge pull request #5 from UMCUGenetics/feature/default-fix-output-fix #53

Workflow file for this run

name: Test (pytest)
on:
push:
branches:
- "**"
pull_request:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-suffix: "uv_cache"
python-version: "3.13.0"
- name: Install dependencies
run: uv sync
- name: Run tests
run: |
set -o pipefail
uv run pytest tests \
--junitxml=pytest.xml \
--cov=src \
--cov-report=term-missing \
--cov-fail-under=70 | \
tee pytest-coverage.txt
- name: Add test coverage comment
# Only comment on events from the same repository (skip forked PRs)
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
# Alternative for open source projects: https://github.com/codecov/example-python
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: pytest-reports-3.13.0
path: |
pytest.xml
pytest-coverage.txt