From c526c8ca22e1136a6f8178bec7a0077d9ecc0267 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Feb 2024 23:36:09 +0100 Subject: [PATCH] add codecov --- .github/workflows/ci.yaml | 5 +++++ .gitignore | 1 + pyproject.toml | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f73d6d8..eb095d3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,6 +33,11 @@ jobs: run: poetry install - name: Run tests run: poetry run pytest + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + check: runs-on: ubuntu-latest steps: diff --git a/.gitignore b/.gitignore index 734944e..13040b8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ __pycache__/ *.py[cod] *$py.class .coverage +cov.xml dist/ diff --git a/pyproject.toml b/pyproject.toml index 9588e8c..98e92f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,11 @@ pytest = "^7.4.4" pytest-cov = "^4.1.0" [tool.pytest.ini_options] -addopts = "--cov=vatsim" +addopts = [ + "--cov-report=term", + "--cov-report=xml:cov.xml", + "--cov=vatsim", +] testpaths = [ "tests", ]