Skip to content

Commit 846c405

Browse files
authored
ci: generate coverage reports and upload to codecov (#52)
1 parent f388517 commit 846c405

File tree

4 files changed

+76
-2
lines changed

4 files changed

+76
-2
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@ jobs:
4242
run: poetry install
4343

4444
- name: "Run tests"
45-
run: poetry run pytest
45+
run: poetry run coverage run --branch --source=decoy -m pytest
46+
47+
- name: "Generate coverage report"
48+
run: poetry run coverage xml
49+
50+
- name: "Upload coverage report"
51+
uses: codecov/codecov-action@v2
4652

4753
check:
4854
name: "Lint and type checks"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ site
44
.python-version
55
__pycache__
66
.cache
7+
.coverage
8+
coverage.xml

poetry.lock

Lines changed: 66 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ pytest = "^6.1.2"
3737
pytest-asyncio = "^0.15.1"
3838
pytest-mypy-plugins = "^1.6.1"
3939
pytest-xdist = "^2.1.0"
40+
coverage = "^5.5"
4041

4142
[tool.poetry.plugins."pytest11"]
4243
"decoy" = "decoy.pytest_plugin"

0 commit comments

Comments
 (0)