From 3d2724d16adc9a862f2dc98e59894df5d266a33a Mon Sep 17 00:00:00 2001 From: David Zaslavsky Date: Sun, 9 Nov 2025 01:41:30 -0800 Subject: [PATCH 1/2] Combine CI jobs into one per Python version We run a lot of tests in CI for such a small project, and in the past each tox environment has been run in a separate GitHub Actions job, but we don't really need to do that. The reason we've been splitting them up that way is to make it clear at a glance what configurations are failing when a CI run fails, but in practice we've never really had a failing workflow where we needed to look at all the different failing tox runs to understand the problem; looking at one failure is generally enough. So, in this commit, I'm consolidating the GHA jobs into one per Python version which will run all the tox environments for that Python version. This cuts down a bit on setup work, and might reduce the load on PyPI a bit, since downloaded packages can potentially be cached across different tox runs for the same Python version. --- .github/workflows/tests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ed8ccb4..370b03f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,6 +6,7 @@ on: jobs: build: + name: 'Python runtime ${{ matrix.versions.python }}' runs-on: '${{ matrix.versions.os || matrix.os }}' # https://wildwolf.name/github-actions-how-to-avoid-running-the-same-workflow-multiple-times/ if: > @@ -42,8 +43,6 @@ jobs: min-deps: '--force-dep pytest==4.6' - python: 'pypy-3.9' min-deps: '--force-dep pytest==4.6' - force-min-deps: [false, true] - extra: ['', '-smtp'] fail-fast: false steps: @@ -58,4 +57,7 @@ jobs: python -m pip install --upgrade pip pip install tox - name: Test with tox - run: tox -vv -e py${{ matrix.extra }} ${{ matrix.force-min-deps && matrix.versions.min-deps || '' }} + run: tox -vv -e py,py-smtp + - name: Test with tox with forced minimum dependencies + if: matrix.versions.min-deps + run: tox -vv -e py,py-smtp ${{ matrix.versions.min-deps }} From 29b219524987f87926e998326b424b0e395e6ac8 Mon Sep 17 00:00:00 2001 From: David Zaslavsky Date: Sun, 9 Nov 2025 01:47:12 -0800 Subject: [PATCH 2/2] Enable package cache This commit enables persistence of the pip cache between different CI jobs, which will further reduce the load on PyPI. --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 370b03f..a67e4ac 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -52,6 +52,7 @@ jobs: with: python-version: ${{ matrix.versions.python }} allow-prereleases: true + cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip