Skip to content

Commit 50f82a6

Browse files
Installing test dependencies in editable mode -e to ensure coverage reporting has visibility of code.
1 parent 1dffd38 commit 50f82a6

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
needs: lint
3939
strategy:
4040
fail-fast: true
41-
# To avoid overwhelming the API with parallel requests. Mock out API in the future
41+
# To avoid overwhelming the API with parallel requests. Mock API in the future.
4242
max-parallel: 1
4343
matrix:
4444
# For backwards compatibility
@@ -53,14 +53,22 @@ jobs:
5353
cache: 'pip'
5454

5555
- name: Install dependencies
56+
# Editable mode (-e) is required for coverage reporting
5657
run: |
5758
python -m pip install --upgrade pip
58-
pip install ".[test]"
59+
pip install -e ".[test]"
5960
60-
- name: Run tests
61+
- name: Run tests with coverage
6162
env:
6263
TDM_API_TOKEN: ${{ secrets.TDM_API_TOKEN }}
63-
run: pytest --cov --cov-report=xml
64+
run: pytest --cov=wiley_tdm --cov-report=xml --cov-report=html
65+
66+
- name: Upload HTML coverage report
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: coverage-report-${{ matrix.python-version }}
70+
path: htmlcov
71+
retention-days: 7
6472

6573
build:
6674
name: Build Package
@@ -92,3 +100,4 @@ jobs:
92100
with:
93101
name: python-dist
94102
path: dist/
103+
retention-days: 7

0 commit comments

Comments
 (0)