Skip to content

Commit

Permalink
Add coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Sep 11, 2024
1 parent 3910715 commit d69d68b
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 5 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,12 @@ jobs:
version: latest
- name: Run tests
run: ./test.sh
- name: "Upload coverage report"
if: github.repository == 'artefactual-labs/clamav-client'
uses: "codecov/codecov-action@v4"
with:
files: ./coverage.xml
fail_ci_if_error: false
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ __pycache__/
*.py[cod]
*.egg-info/
dist/
.coverage
coverage.xml
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# clamav-client

[![PyPI version](https://badge.fury.io/py/clamav-client.svg)](https://badge.fury.io/py/clamav-client)
[![GitHub CI](https://github.com/artefactual-labs/clamav-client/actions/workflows/test.yml/badge.svg)](https://github.com/artefactual-labs/clamav-client/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/artefactual-labs/clamav-client/graph/badge.svg?token=ldznzhNTG0)](https://codecov.io/gh/artefactual-labs/clamav-client)

`clamav-client` is a portable Python module to use the ClamAV anti-virus engine
on Windows, Linux, MacOSX and other platforms. It requires a running instance
of the `clamd` daemon.
on Windows, Linux, MacOSX and other platforms. It requires a running instance
of the `clamd` daemon.

This is a fork of [clamd] ([5c5e33b2]) created by Thomas Grainger. It introduces
type hints and tests exclusively against supported Python versions.


[clamd]: https://github.com/graingert/python-clamd
[5c5e33b2]: https://github.com/graingert/python-clamd/commit/5c5e33b2dfd0499470e15abeb83efb6531ef9ab7
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ source = "vcs"
[tool.uv]
dev-dependencies = [
"mypy>=1.11.2",
"pytest-cov>=5.0.0",
"pytest>=8.3.2",
"ruff>=0.6.3",
]
Expand Down
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ print_status() {

for version in "${versions[@]}"; do
print_status "Running \`pytest\` using Python $version..."
uv run --frozen --python "$version" -- pytest
uv run --frozen --python "$version" -- pytest --cov clamav_client --cov-report xml:coverage.xml --cov-append
done

latest="${versions[${#versions[@]}-1]}"
Expand Down
Loading

0 comments on commit d69d68b

Please sign in to comment.