Skip to content

Commit 3ea0dd6

Browse files
authored
test: Allow integration and unit tests to run against EOL or desired python version (#674)
1 parent 590d99a commit 3ea0dd6

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

.github/workflows/e2e-suite.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,27 @@ on:
1717
pull_request_number:
1818
description: 'The number of the PR. Ensure sha value is provided'
1919
required: false
20+
python-version:
21+
description: 'Specify Python version to use'
22+
required: false
23+
run-eol-python-version:
24+
description: 'Run EOL python version?'
25+
required: false
26+
default: 'false'
27+
type: choice
28+
options:
29+
- 'true'
30+
- 'false'
2031
push:
2132
branches:
2233
- main
2334
- dev
2435

36+
env:
37+
DEFAULT_PYTHON_VERSION: "3.10"
38+
EOL_PYTHON_VERSION: "3.8"
39+
EXIT_STATUS: 0
40+
2541
jobs:
2642
integration_tests:
2743
name: Run integration tests on Ubuntu
@@ -74,7 +90,7 @@ jobs:
7490
- name: Setup Python
7591
uses: actions/setup-python@v4
7692
with:
77-
python-version: '3.x'
93+
python-version: ${{ inputs.run-eol-python-version == 'true' && env.EOL_PYTHON_VERSION || inputs.python-version || env.DEFAULT_PYTHON_VERSION }}
7894

7995
- name: Install Python dependencies and update cert
8096
run: |

.github/workflows/unit-tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
jobs:
77
unit-tests-on-ubuntu:
88
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [ '3.9','3.10','3.11', '3.12' ]
912
steps:
1013
- name: Clone Repository
1114
uses: actions/checkout@v3
@@ -14,9 +17,9 @@ jobs:
1417
run: sudo apt-get update -y
1518

1619
- name: Setup Python
17-
uses: actions/setup-python@v4
20+
uses: actions/setup-python@v5
1821
with:
19-
python-version: '3.x'
22+
python-version: ${{ matrix.python-version }}
2023

2124
- name: Install Python wheel
2225
run: pip install wheel boto3

0 commit comments

Comments
 (0)