diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 814fd9d..c1b3a89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,6 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest - os: ubuntu-24.04-arm - os: windows-latest - os: macos-latest @@ -58,6 +57,27 @@ jobs: - uses: ./.github/actions/setup_rye - run: rye test -a + pytest-cov: + name: Run tests and collect coverage + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + + - name: Setup rye + uses: ./.github/actions/setup_rye + + - name: Run tests + run: rye test -a -- --cov --cov-branch --cov-report=xml + + - name: Upload results to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + docs: name: Documentation build runs-on: ubuntu-latest @@ -78,6 +98,7 @@ jobs: - pre-commit - mypy - pytest + - pytest-cov - docs runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index fe94ef5..bf5055a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,7 @@ requirements-dev.lock # rye is the primary tool, uv is only used for on-the-fly setups uv.lock + +# coverage files +.coverage +coverage.xml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 146b24e..150dd9a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,4 +21,4 @@ repos: hooks: - id: taplo-format # lint fetches schemas online at each call, deactivate for now - - id: taplo-lint + # - id: taplo-lint # excluded because json is fetched online and not reachable (503)