Skip to content

Commit

Permalink
Fix: Resolve the Codecov reporting (#58)
Browse files Browse the repository at this point in the history
# Description

This resolves the code coverage reporting, so the actual source files
will also have coverage reported. I configured my own fork with a token
and you can view the results:
https://app.codecov.io/github/stumpylog/whoosh-reloaded

The main fix is to install using `pip install -e .` or editable.
Otherwise, coverage was not picked up those files are being relvant.

The other small fix was to only run the testing once.

Closes: #48

# Checklist:

- [x] I have performed a self-review of my own code
- [ ] I have commented my code in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
  • Loading branch information
ZeroCool940711 authored Feb 8, 2024
2 parents 4224e2c + ae5d7e0 commit b85d900
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install pytest pytest-cov coverage cached-property
python setup.py clean build install
- name: Run test
run: pytest

- name: Generate coverage report
pip install pytest pytest-cov pytest-sugar coverage cached-property
- name: Install Whoosh
run: |
pip install -e .
- name: Run tests
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml
pytest --cov=./ --cov-report=xml --cov-report=html
- name: Upload HTML coverage report
uses: actions/upload-artifact@v4
with:
name: "HTML Coverage ${{ matrix.python-version }}"
path: "htmlcov"
retention-days: 7

- name: Upload Coverage to Codecov
uses: codecov/[email protected]
Expand Down

0 comments on commit b85d900

Please sign in to comment.