From 08ca29a9da7a541211d902204a8928eb2a7b070a Mon Sep 17 00:00:00 2001 From: Rambaud Pierrick <12rambau@users.noreply.github.com> Date: Mon, 23 Oct 2023 03:11:17 -0700 Subject: [PATCH] test: add a codecov token to the coverage pipeline (#1519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: add a codecov token to the coverage pipeline * trigger CI * fix: use default filename * fix: stop checking branches as codecov don't display them * refactor: set fail_under parameter in pyproject * get back green tests ! (#13) * BUG - Clear alt_text in conf.py (#1471) * comment out alt_text in conf.py * set alt_text to empty string * remove alt_text from conf.py * fix: use 12rambau fork until it's merged with nikeee repo (#1517) * deps: drop support for Sphinx 5 (#1516) * remove ref to myst-nb * update minimal supported version of sphinx * Fix: (webpack.config.js) css-loader API change (#1508) * Fix: (webpack.config.js) css-loader API change The build was broken in /. This change fixes the build, and it seems to be in accordance with the current API as described at . Closes . * dedup * restore version bump --------- Co-authored-by: Daniel McCloy * Fix duplicate HTML IDs (#1425) * Fix duplicate HTML IDs * fix tests * Do not animate the version admonitions colors. (#1424) Otherwise a delay has to be added to the accessibility color contrast checks, to wait for the colors to fully transition. * BUG - Remove redundant ARIA in breadcrumb navigation (#1426) * style(i18n): French Typo fixed (#1430) * Add the ability to add a center section to the footer (#1432) * Add a center section for the footer * Add docs for footer_center * Add a test site for the center footer * test it in our own docs * remove new test site * add footer test --------- Co-authored-by: Daniel McCloy * Build(deps): Bump actions/checkout from 3 to 4 (#1433) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add dropdown_text argument to generate_header_nav_html (#1423) * Add dropdown_text argument to generate_header_nav_html * Add a test, fix typo in theme.conf and remove header_dropdown_text from docs/conf.py * fixed? --------- Co-authored-by: Daniel McCloy * fix: rollback ref and Id changes (#1438) * bump: version 0.13.3 → 0.14.0 (#1440) * bump version * update version switcher * back to dev * fix: change the z-index of the dropdown (#1442) In order to be on top of the primary sidebar on small screens. * fix: set the same background for dark/light (#1443) * fix: set the same background for dark/light et the same background color for all state of the search field. It is currently only applied when hovered * fix: wrong css selector * Update src/pydata_sphinx_theme/assets/styles/components/_search.scss * Update src/pydata_sphinx_theme/assets/styles/components/_search.scss * Fix duplicate HTML IDs * fix tests * unique_html_id * backwards-compat generate_header_nav_html * feedback review * update fixture * ughhhh...caching * code cleanup * fix test snapshot * put comment inside def --------- Signed-off-by: dependabot[bot] Co-authored-by: Denis Bitouzé Co-authored-by: Stuart Mumford Co-authored-by: Daniel McCloy Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alenka Frim Co-authored-by: Rambaud Pierrick <12rambau@users.noreply.github.com> * chore: build the devcontainer automatically in codespace (#1483) * chore: build the devcontainer automaticallyin codespace * refactor: lint * add pandoc to the environment * Fix font color in search input box (#1524) * Fix color * Use --pst-color-text-base * docs: add DecentralChain (#1528) Co-authored-by: jourlez * Updates for file src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po in ru [Manual Sync] (#1527) i18n: Translate sphinx.po in ru [Manual Sync] 96% of minimum 20% translated source file: 'sphinx.po' on 'ru'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * ignore transient errors in windows build CI (#1520) * use warning list * clean up notebook * refactor to pass on all platforms? * simplify * fix logic * iterate backwards * fix plaform detection? also don't log unnecessarily * ignore empty string warnings * remove notebook metawarning * Revert "remove notebook metawarning" This reverts commit 42f46723eb9eeea7603efb91fbfb6bdfa1de28b3. * try again * debug the mysterious empty warning * escape color codes * import * triage by intermittency, not by platform; better var names * simplify * fix list.remove * undo what I broke * Update tests/utils/check_warnings.py --------- Signed-off-by: dependabot[bot] Co-authored-by: gabalafou Co-authored-by: Adam Porter Co-authored-by: Daniel McCloy Co-authored-by: Denis Bitouzé Co-authored-by: Stuart Mumford Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alenka Frim Co-authored-by: Harutaka Kawamura Co-authored-by: jourlez Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * test branch coverage --------- Signed-off-by: dependabot[bot] Co-authored-by: gabalafou Co-authored-by: Adam Porter Co-authored-by: Daniel McCloy Co-authored-by: Denis Bitouzé Co-authored-by: Stuart Mumford Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alenka Frim Co-authored-by: Harutaka Kawamura Co-authored-by: jourlez Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --- .github/workflows/tests.yml | 9 +++------ pyproject.toml | 7 +++++++ 2 files changed, 10 insertions(+), 6 deletions(-) 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