Skip to content

Commit 6eb3d4f

Browse files
authored
Merge pull request #201 from cordada/task/ci-cd-use-latest-python-patch-version
Use most recent patch version of Python in CI/CD configuration
2 parents b3e518b + 839f6f1 commit 6eb3d4f

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

.github/workflows/ci.yaml

+13-9
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,20 @@ jobs:
3131
strategy:
3232
matrix:
3333
python_version:
34-
- "3.8.18"
35-
- "3.9.18"
36-
- "3.10.13"
34+
- "3.8"
35+
- "3.9"
36+
- "3.10"
3737

3838
steps:
3939
- name: Check Out VCS Repository
4040
uses: actions/[email protected]
4141

4242
- name: Set Up Python ${{ matrix.python_version }}
43+
id: set_up_python
4344
uses: actions/[email protected]
4445
with:
4546
python-version: "${{ matrix.python_version }}"
47+
check-latest: true
4648

4749
- name: Create Python Virtual Environment
4850
run: make python-virtualenv PYTHON_VIRTUALENV_DIR=".pyenv"
@@ -51,7 +53,7 @@ jobs:
5153
uses: actions/[email protected]
5254
with:
5355
path: ".pyenv"
54-
key: py-v1-deps-${{ runner.os }}-${{ matrix.python_version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('Makefile', 'make/**.mk') }}
56+
key: py-v1-deps-${{ runner.os }}-${{ steps.set_up_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('Makefile', 'make/**.mk') }}
5557

5658
- name: Install Dependencies
5759
run: |
@@ -72,24 +74,26 @@ jobs:
7274
strategy:
7375
matrix:
7476
python_version:
75-
- "3.8.18"
76-
- "3.9.18"
77-
- "3.10.13"
77+
- "3.8"
78+
- "3.9"
79+
- "3.10"
7880

7981
steps:
8082
- name: Check Out VCS Repository
8183
uses: actions/[email protected]
8284

8385
- name: Set Up Python ${{ matrix.python_version }}
86+
id: set_up_python
8487
uses: actions/[email protected]
8588
with:
8689
python-version: "${{ matrix.python_version }}"
90+
check-latest: true
8791

8892
- name: Restoring/Saving Cache
8993
uses: actions/[email protected]
9094
with:
9195
path: ".pyenv"
92-
key: py-v1-deps-${{ runner.os }}-${{ matrix.python_version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('Makefile', 'make/**.mk') }}
96+
key: py-v1-deps-${{ runner.os }}-${{ steps.set_up_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('Makefile', 'make/**.mk') }}
9397
fail-on-cache-miss: true
9498

9599
- name: Set Tox Environment
@@ -133,7 +137,7 @@ jobs:
133137

134138
- name: Check that compiled Python dependency manifests are up-to-date with their sources
135139
# FIXME: There are issues related to testing with multiple Python versions.
136-
if: ${{ startsWith(matrix.python_version, '3.8.') }}
140+
if: ${{ startsWith(steps.set_up_python.outputs.python-version, '3.8.') }}
137141
run: |
138142
source "$PYTHON_VIRTUALENV_ACTIVATE"
139143
make python-deps-sync-check

.github/workflows/deploy.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,18 @@ jobs:
3333
id: set_up_python
3434
uses: actions/[email protected]
3535
with:
36-
python-version: "3.10.13"
36+
python-version: "3.10"
3737

3838
- name: Restoring/Saving Cache
3939
uses: actions/[email protected]
4040
with:
4141
path: ".pyenv"
4242
key: py-v1-deps-${{ runner.os }}-${{ steps.set_up_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('Makefile', 'make/**.mk') }}
43-
fail-on-cache-miss: true
43+
44+
- name: Install Dependencies
45+
run: |
46+
source "$PYTHON_VIRTUALENV_ACTIVATE"
47+
make install-deps-dev
4448
4549
- name: Restore Artifacts (Release)
4650
uses: actions/[email protected]

.github/workflows/release.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
id: set_up_python
4242
uses: actions/[email protected]
4343
with:
44-
python-version: "3.10.13"
44+
python-version: "3.10"
4545

4646
- name: Create Python Virtual Environment
4747
run: make python-virtualenv PYTHON_VIRTUALENV_DIR=".pyenv"
@@ -51,7 +51,6 @@ jobs:
5151
with:
5252
path: ".pyenv"
5353
key: py-v1-deps-${{ runner.os }}-${{ steps.set_up_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('Makefile', 'make/**.mk') }}
54-
fail-on-cache-miss: true
5554

5655
- name: Install Dependencies
5756
run: |

0 commit comments

Comments
 (0)