Skip to content

Commit 60f429c

Browse files
committed
fix coverage
1 parent 43f408c commit 60f429c

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,20 @@ jobs:
2626
python -m pip install --upgrade pip
2727
pip install -e ".[dev]"
2828
29-
- name: Run tests
29+
- name: Run tests with coverage
3030
env:
3131
DATABUNKER_API_URL: ${{ secrets.DATABUNKER_API_URL || 'https://pro.databunker.org' }}
3232
DATABUNKER_API_TOKEN: ${{ secrets.DATABUNKER_API_TOKEN }}
3333
DATABUNKER_TENANT_NAME: ${{ secrets.DATABUNKER_TENANT_NAME }}
3434
run: |
35-
pytest --cov=databunkerpro tests/ -v
35+
pytest --cov=databunkerpro --cov-report=xml tests/ -v
3636
3737
- name: Upload coverage to Codecov
38-
uses: codecov/codecov-action@v2
38+
uses: codecov/codecov-action@v3
3939
with:
40-
file: ./coverage.xml
40+
files: ./coverage.xml
4141
fail_ci_if_error: true
42+
token: ${{ secrets.CODECOV_TOKEN }}
4243

4344
lint:
4445
runs-on: ubuntu-latest

pytest.ini

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[pytest]
2+
testpaths = tests
3+
python_files = test_*.py
4+
python_classes = Test*
5+
python_functions = test_*
6+
7+
addopts =
8+
--verbose
9+
--cov=databunkerpro
10+
--cov-report=xml
11+
--cov-report=term-missing
12+
--no-cov-on-fail

0 commit comments

Comments
 (0)