Skip to content

Commit f8b3bec

Browse files
committed
Add Pytest Coverage to Git Actions
1 parent ab30476 commit f8b3bec

File tree

3 files changed

+109
-13
lines changed

3 files changed

+109
-13
lines changed

.github/workflows/run-tests-on-push.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- run: pip install --upgrade pip
1919
- run: pip install poetry
2020
- run: poetry install --with dev --extras server
21-
- run: poetry run pytest tests/ --show-capture=stdout
21+
- run: poetry run pytest tests/ --show-capture=stdout --cov=src
2222

2323
run-tests-3_10:
2424
runs-on: ubuntu-latest
@@ -32,7 +32,7 @@ jobs:
3232
- run: pip install --upgrade pip
3333
- run: pip install poetry
3434
- run: poetry install --with dev --extras server
35-
- run: poetry run pytest tests/ --show-capture=stdout
35+
- run: poetry run pytest tests/ --show-capture=stdout --cov=src
3636

3737
run-tests-3_11:
3838
runs-on: ubuntu-latest
@@ -46,7 +46,7 @@ jobs:
4646
- run: pip install --upgrade pip
4747
- run: pip install poetry
4848
- run: poetry install --with dev --extras server
49-
- run: poetry run pytest tests/ --show-capture=stdout
49+
- run: poetry run pytest tests/ --show-capture=stdout --cov=src
5050

5151
run-mypy-3_10:
5252
runs-on: ubuntu-latest

poetry.lock

Lines changed: 105 additions & 10 deletions
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
@@ -72,6 +72,7 @@ pre-commit = "*"
7272
jsonschema = "*"
7373
fakeredis = "~2.21.1"
7474
pytest = "~7.2.0"
75+
pytest-cov = "~5.0.0"
7576
pytest-postgresql = "~5.0.0"
7677
pytest-asyncio = "~0.23.5"
7778
pytest-socket = "~0.6.0"

0 commit comments

Comments
 (0)