diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 0000000..4e5d31b --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,7 @@ +coverage: + status: + project: + default: + target: 90% + threshold: 1% + patch: off \ No newline at end of file diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index b444d47..8d425ad 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -21,9 +21,9 @@ jobs: - name: Run tests run: | ./tests.sh - - name: Coveralls - run: | - pip install coveralls - coveralls --service=github + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + with: + files: coverage.xml env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 8227ca7..99e2cbc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ *.pyc .coverage .coverage* +coverages/ +coverage.xml dist/ build/ *.egg-info/ diff --git a/tests.sh b/tests.sh index 03b8574..0896e6d 100755 --- a/tests.sh +++ b/tests.sh @@ -68,7 +68,8 @@ set -e # unittest echo "[+] unittests" -coverage run -p -m pytest tests +mkdir -p coverages/ +coverage run -p --data-file coverages/coverage -m pytest tests # tests-ng echo "[+] tests-ng" @@ -92,7 +93,8 @@ done # merge coverage echo "[+] coverage merge" -coverage combine +coverage combine coverages/* +coverage xml echo "ALL TESTS DONE OK" exit 0