Skip to content

Commit d6230ba

Browse files
committed
Add code coverage check
1 parent d3641a9 commit d6230ba

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/test-code.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install pytest
29+
pip install pytest, pytest-cov
3030
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3131
- name: Install dataflow_transfer
3232
run: pip install -e .
3333
- name: Test with pytest
3434
run: |
35-
pytest
35+
pytest --cov --cov-branch --cov-report=xml
36+
- name: Upload coverage reports to Codecov
37+
uses: codecov/codecov-action@v5
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ dependencies = [
4040
dev = [
4141
"ruff>=0.11.8",
4242
"pytest",
43+
"pytest-cov",
4344
]
4445

4546
[project.scripts]

requirements-dev.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-r requirements.txt
2+
ruff>=0.11.8
3+
pytest
4+
pytest-cov

0 commit comments

Comments
 (0)