Skip to content

Commit

Permalink
Try to fix coverage and fix tests badge
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolCat467 committed Oct 5, 2024
1 parent 05be5c8 commit 45b6346
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Scanner-Server
Kind of like CUPS but it's for scanning, not printing.

[![Tests](https://github.com/CoolCat467/Scanner-Server/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/CoolCat467/Scanner-Server/actions/workflows/tests.yml)
[![Tests](https://github.com/CoolCat467/Scanner-Server/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/CoolCat467/Scanner-Server/actions/workflows/ci.yml)
<!-- BADGIE TIME -->

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/CoolCat467/Scanner-Server/main.svg)](https://results.pre-commit.ci/latest/github/CoolCat467/Scanner-Server/main)
Expand Down
2 changes: 1 addition & 1 deletion ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ else

echo "::endgroup::"
echo "::group:: Run Tests"
if COVERAGE_PROCESS_START=$(pwd)/../pyproject.toml coverage run --rcfile=../pyproject.toml -m pytest -ra --junitxml=../test-results.xml "$(pwd)/../tests" --verbose --durations=10 $flags; then
if coverage run --rcfile=../pyproject.toml -m pytest -ra --junitxml=../test-results.xml "$(pwd)/../tests" --verbose --durations=10 $flags; then
PASSED=true
else
PASSED=false
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ extend-ignore = [
]

[tool.pytest.ini_options]
addopts = "--cov-report term-missing --cov=sanescansrv"
addopts = "--cov=sanescansrv --cov-report=xml --cov-report=term-missing"
testpaths = [
"tests",
]
Expand Down
6 changes: 6 additions & 0 deletions tests/test_import.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import sanescansrv


def test_has_run() -> None:
assert hasattr(sanescansrv, "run")
assert callable(sanescansrv.run)

0 comments on commit 45b6346

Please sign in to comment.