diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fe88d592f..3a797d44b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,9 +20,6 @@ on: pull_request: workflow_call: -env: - COVERAGE_THRESHOLD: 60 - jobs: lint: strategy: @@ -91,12 +88,12 @@ jobs: pip install nox nox -s compile - name: Run tests - run: pytest -m "not a11y" --color=yes --cov pydata_sphinx_theme --cov-branch --cov-report xml:cov.xml --cov-report= --cov-fail-under ${{ env.COVERAGE_THRESHOLD }} + run: pytest -m "not a11y" --color=yes --cov --cov-report=xml - name: Upload to Codecov if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' - uses: codecov/codecov-action@v3.1.4 + uses: codecov/codecov-action@v3 with: - files: cov.xml + token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true # note I am setting this on top of the Python cache as I could not find diff --git a/pyproject.toml b/pyproject.toml index 221518678..360296011 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -115,3 +115,10 @@ ignore = "H006,J018,T003,H025" [tool.pytest.ini_options] markers = "a11y: mark a test as an accessibility test" + +[tool.coverage.run] +source = ["pydata_sphinx_theme"] +branch = true + +[tool.coverage.report] +fail_under = 60