Skip to content

Commit 8d4810b

Browse files
committed
ci: Add an env variable with the default Python version
When not using a matrix, we want to use the same Python version for all jobs and steps for consistency. To make it easier to update, we add an `env` variable with the default version so we can use it where it is needed. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 064e06d commit 8d4810b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: frequenz-channels-python
22

33
on: [pull_request, push, workflow_dispatch]
44

5+
env:
6+
DEFAULT_PYTHON_VERSION: "3.10"
7+
58
jobs:
69
test:
710
strategy:
@@ -49,7 +52,7 @@ jobs:
4952
- name: Set up Python
5053
uses: actions/setup-python@v4
5154
with:
52-
python-version: "3.10"
55+
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
5356

5457
- name: Install build dependencies
5558
run: |
@@ -79,7 +82,7 @@ jobs:
7982
- name: Set up Python
8083
uses: actions/setup-python@v4
8184
with:
82-
python-version: "3.10"
85+
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
8386

8487
- name: Install build dependencies
8588
run: |
@@ -156,7 +159,7 @@ jobs:
156159
if: steps.mike-metadata.outputs.version
157160
uses: actions/setup-python@v4
158161
with:
159-
python-version: "3.10"
162+
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
160163

161164
- name: Install build dependencies
162165
if: steps.mike-metadata.outputs.version

0 commit comments

Comments
 (0)