Skip to content

Commit

Permalink
Add coverage step
Browse files Browse the repository at this point in the history
  • Loading branch information
vladistan authored and AdamFinkle committed Aug 29, 2024
1 parent d1cfcaf commit ec82c74
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,33 @@ jobs:
with:
python-version: 3.12
cache: pip
- name: Install Nox and group dependencies
- name: Install dev group dependencies
run: pip install '.[dev]'
- name: Test with Nox
run: nox -s mypy-3.12
coverage:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
- name: Install dev group dependencies
run: pip install '.[dev]'
- name: Install package in place
run: pip install -e .
# We are not testing with Nox because Nox / Pytest / Coverage and CodeCov
# have a weird cross interaction. It doesn't matter for us anyway because we use only
- name: Test with py test
run: pytest -n auto --cov --junitxml=junit.xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ dev = [
"pytest==8.3.2",
"pytest-cov==5.0.0",
"pytest_sugar==1.0.0",
"pytest-xdist==3.6.1",
"xsdata[cli]==24.7",
"ruff==0.5.5"
]
Expand Down

0 comments on commit ec82c74

Please sign in to comment.