Skip to content

Commit 3d2724d

Browse files
committed
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.
1 parent a177a59 commit 3d2724d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
jobs:
88
build:
9+
name: 'Python runtime ${{ matrix.versions.python }}'
910
runs-on: '${{ matrix.versions.os || matrix.os }}'
1011
# https://wildwolf.name/github-actions-how-to-avoid-running-the-same-workflow-multiple-times/
1112
if: >
@@ -42,8 +43,6 @@ jobs:
4243
min-deps: '--force-dep pytest==4.6'
4344
- python: 'pypy-3.9'
4445
min-deps: '--force-dep pytest==4.6'
45-
force-min-deps: [false, true]
46-
extra: ['', '-smtp']
4746
fail-fast: false
4847

4948
steps:
@@ -58,4 +57,7 @@ jobs:
5857
python -m pip install --upgrade pip
5958
pip install tox
6059
- name: Test with tox
61-
run: tox -vv -e py${{ matrix.extra }} ${{ matrix.force-min-deps && matrix.versions.min-deps || '' }}
60+
run: tox -vv -e py,py-smtp
61+
- name: Test with tox with forced minimum dependencies
62+
if: matrix.versions.min-deps
63+
run: tox -vv -e py,py-smtp ${{ matrix.versions.min-deps }}

0 commit comments

Comments
 (0)