Skip to content

Commit

Permalink
feat(ci): Add Codecov to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tkarabela committed Nov 17, 2023
1 parent 35fb4a3 commit db61157
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@ jobs:
run: |
source .venv/bin/activate
python -m pytest
- name: Generate coverage report for okane.py
run: |
python -m pytest --cov=okane --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
env_vars: OS,PYTHON
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
/dist
.pytest_cache/
poetry.lock
.coverage
coverage.xml
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pydantic = "^1.10"
[tool.poetry.group.dev.dependencies]
mypy = "^1.1"
pytest = "^7.2"
pytest-cov = "^4.0"
lxml-stubs = "^0.4"

[tool.poetry.scripts]
Expand All @@ -47,3 +48,10 @@ okane = "okane:main"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.coverage.run]
branch = true

[tool.coverage.report]
show_missing = true
skip_covered = true

0 comments on commit db61157

Please sign in to comment.