Skip to content

Commit 4ddd544

Browse files
bielsnohrJezSw
andauthored
Expand Python version range for build matrix and where the version variable is used
Co-authored-by: JezSw <jez.swann@ukaea.uk>
1 parent 9ea4837 commit 4ddd544

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

episodes/23-continuous-integration-automated-testing.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ jobs:
363363
strategy:
364364
matrix:
365365
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
366-
python-version: ["3.10", "3.11"]
366+
python-version: ["3.10", "3.11", "3.12"]
367367
368368
# Here we add the reference to the os matrix values
369369
runs-on: ${{ matrix.os }}
@@ -374,7 +374,7 @@ jobs:
374374
- name: Checkout repository
375375
uses: actions/checkout@v4
376376
377-
- name: Set up Python
377+
- name: Set up Python ${{ matrix.python-version }}
378378
uses: actions/setup-python@v5
379379
with:
380380
# Here we add the reference to the python-version matrix values
@@ -391,9 +391,12 @@ jobs:
391391

392392
The `{{ }}` are used
393393
as a means to reference configuration values from the matrix.
394-
This way, every possible permutation of Python versions 3.10 and 3.11
394+
This way, every possible permutation of Python versions 3.10 through 3.12
395395
with the latest versions of Ubuntu, Mac OS and Windows operating systems
396-
will be tested and we can expect 6 build jobs in total.
396+
will be tested, and we can expect 9 build jobs in total.
397+
We can also use this in the `name` key of the step to accurately reflect what it is doing
398+
(e.g. which Python version is being setup).
399+
This will be reflected in the GitHub Action output, making parsing those logs easier.
397400

398401
Let us commit and push this change and see what happens:
399402

0 commit comments

Comments
 (0)