Skip to content

Commit 8d3261f

Browse files
build combined coverage report to reflect total line coverage across both test suites
1 parent d271017 commit 8d3261f

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/reusable_run_tests.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,25 @@ jobs:
5353
5454
- name: Run unit tests with coverage
5555
run: |
56-
poetry run pytest --python ${{ matrix.python-version }} -v -m "not integration" --cov=ncompare --cov-report=xml:build/reports/coverage${{ matrix.python-version }}.xml
56+
poetry run pytest --python ${{ matrix.python-version }} -v -m "not integration" --cov=ncompare --cov-report=
5757
5858
- name: Run integration tests with coverage
5959
env:
6060
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }}
6161
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }}
6262
run: |
63-
poetry run pytest --python ${{ matrix.python-version }} -v -m integration --cov=ncompare --cov-report=xml:build/reports/coverage${{ matrix.python-version }}.xml
63+
poetry run pytest --python ${{ matrix.python-version }} -v -m integration --cov=ncompare --cov-append --cov-report=
64+
65+
- name: Generate combined coverage report
66+
run: |
67+
poetry run coverage xml -o build/reports/coverage${{ matrix.python-version }}.xml
68+
poetry run coverage report
6469
6570
- name: Upload coverage reports to Codecov
6671
uses: codecov/codecov-action@v5
6772
with:
6873
token: ${{ secrets.CODECOV_TOKEN }}
69-
verbose: true
74+
files: build/reports/coverage${{ matrix.python-version }}.xml
75+
flags: python-${{ matrix.python-version }}
76+
name: python-${{ matrix.python-version }}
77+
verbose: true

0 commit comments

Comments
 (0)