Skip to content

Commit

Permalink
adding coverage tests and test artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
takline committed Aug 8, 2024
1 parent 5e46c2d commit 23ef374
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,34 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Run tests
- name: Run tests with pytest
run: |
pytest tests/
pytest tests/ --junitxml=tests/test-results.xml --tb=long -vv --cov=./ --cov-report=xml:tests/coverage.xml
continue-on-error: true

- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results
path: tests/test-results.xml

- name: Upload coverage results
if: always()
uses: actions/upload-artifact@v3
with:
name: coverage-results
path: tests/coverage.xml

- name: Annotate the test results
if: failure()
uses: dorny/test-reporter@v1
with:
name: Pytest
path: tests/test-results.xml
reporter: pytest
build:
name: Build distribution 📦
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ pytest>=8.2.2
python-dateutil>=2.8.0
free-proxy>=1.1.1
Jinja2==3.1.4
PyYAML==5.3.1
PyYAML==5.3.1
pytest-cov==5.0.0

0 comments on commit 23ef374

Please sign in to comment.