Skip to content

Commit

Permalink
Add CodeCov to pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-thom committed Apr 15, 2024
1 parent 502bb49 commit 27a54b4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/pull_request_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Pytest

on: pull_request

env:
COVERAGE_DEBUG: trace

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -21,7 +24,18 @@ jobs:
python -m pip install ".[dev]"
- name: Run pytest
run: |
python -m pytest -v --disable-warnings tests
python -m pytest -v --disable-warnings --cov=./ --cov-report=xml:coverage.xml
cat coverage.xml
- name: codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
verbose: true
mypy:
runs-on: ubuntu-latest
name: "mypy"
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,8 @@ docstring-code-line-length = "dynamic"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402"]
"**/{tests,docs,tools}/*" = ["E402"]

[tool.coverage.run]
include = [
"src/infrasys/**/*.py",
]

0 comments on commit 27a54b4

Please sign in to comment.