From bf5e5078b7f5bb2a2705867dfc5fd26724505625 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:13:32 +0200 Subject: [PATCH 1/2] Set COVERAGE_CORE=sysmon for faster test coverage on 3.12+ --- pyproject.toml | 8 +++++--- tox.ini | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fc81573..6337f8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,7 +101,9 @@ convention = "google" [tool.pytest.ini_options] addopts = "--color=yes" filterwarnings = [ - "error", - # https://github.com/dateutil/dateutil/issues/1314 - "ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning:dateutil.tz.tz", + "error", + # https://github.com/dateutil/dateutil/issues/1314 + "ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning:dateutil.tz.tz", + # Python <= 3.11 + "ignore:sys.monitoring isn't available, using default core:coverage.exceptions.CoverageWarning", ] diff --git a/tox.ini b/tox.ini index fa6dd0c..e77bc92 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,8 @@ extras = tests pass_env = FORCE_COLOR +set_env = + COVERAGE_CORE = sysmon commands = {envpython} -m pytest \ --cov humanize \ @@ -22,7 +24,7 @@ commands = [testenv:docs] deps = - -rdocs/requirements.txt + -r docs/requirements.txt commands = mkdocs build From 2918ca3346cacaef48e5e0ba4b90164415d4aaaf Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:13:42 +0200 Subject: [PATCH 2/2] Pin codecov/codecov-action to v3.1.5 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bf69ec6..25c2abc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,7 +49,7 @@ jobs: tox -e py - name: Upload coverage - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v3.1.5 with: flags: ${{ matrix.os }} name: ${{ matrix.os }} Python ${{ matrix.python-version }}