|
1 | | -on: [push] |
| 1 | +on: [ push ] |
2 | 2 |
|
3 | 3 | jobs: |
4 | 4 | test_setup_python: |
| 5 | + strategy: |
| 6 | + matrix: |
| 7 | + # This tests the amazon linux versions receiving standard support |
| 8 | + # Refer - https://endoflife.date/amazon-linux |
| 9 | + amazon-linux-version: [ 2, 2023 ] |
| 10 | + # This tests the lowest supported python version and the latest stable python version |
| 11 | + # Refer - https://devguide.python.org/versions/#status-of-python-versions |
| 12 | + python-version: |
| 13 | + - 3.8.18 |
| 14 | + - 3.12.0 |
| 15 | + cache: |
| 16 | + - true |
| 17 | + - false |
5 | 18 | runs-on: ubuntu-latest |
| 19 | + container: amazonlinux:${{ matrix.amazon-linux-version }} |
6 | 20 | steps: |
7 | | - - uses: actions/checkout@v4 |
| 21 | + - name: Setup runner |
| 22 | + run: | |
| 23 | + yum install -y git tar gzip sudo which |
| 24 | +
|
| 25 | + - uses: actions/checkout@v3 |
| 26 | + |
| 27 | + - name: Install python |
| 28 | + uses: ./ |
| 29 | + with: |
| 30 | + python-version: ${{ matrix.python-version }} |
| 31 | + cache: ${{ matrix.cache }} |
| 32 | + |
| 33 | + - name: Test installation |
| 34 | + run: | |
| 35 | + set -x |
| 36 | + |
| 37 | + which python3 |
| 38 | + which python |
| 39 | + |
| 40 | + python3 --version 2>&1 | grep -F "${{ matrix.python-version }}" |
| 41 | + test "$(python3 -m pip --version)" = "$(pip3 --version)" |
| 42 | + |
| 43 | + python --version 2>&1 | grep -F "${{ matrix.python-version }}" |
| 44 | + test "$(python3 -m pip --version)" = "$(pip --version)" |
| 45 | +
|
| 46 | + test_major_version_specification: |
| 47 | + runs-on: ubuntu-latest |
| 48 | + container: amazonlinux:2023 |
| 49 | + steps: |
| 50 | + - name: Setup runner |
| 51 | + run: | |
| 52 | + yum install -y git tar gzip sudo |
| 53 | +
|
| 54 | + - uses: actions/checkout@v3 |
| 55 | + |
8 | 56 | - name: Install python |
9 | | - uses: . |
| 57 | + uses: ./ |
10 | 58 | with: |
11 | | - python-version: 3.8 |
| 59 | + python-version: 3 |
| 60 | + |
| 61 | + - name: Test installation |
| 62 | + run: | |
| 63 | + set -x |
| 64 | + |
| 65 | + python3 --version 2>&1 | grep -F "3.12.0" |
| 66 | +
|
| 67 | + test_minor_version_specification: |
| 68 | + runs-on: ubuntu-latest |
| 69 | + container: amazonlinux:2023 |
| 70 | + steps: |
| 71 | + - name: Setup runner |
| 72 | + run: | |
| 73 | + yum install -y git tar gzip sudo |
| 74 | +
|
| 75 | + - uses: actions/checkout@v3 |
| 76 | + |
| 77 | + - name: Install python |
| 78 | + uses: ./ |
| 79 | + with: |
| 80 | + python-version: 3.9 |
| 81 | + |
12 | 82 | - name: Test installation |
13 | 83 | run: | |
14 | | - python --version |
| 84 | + set -x |
| 85 | + |
| 86 | + python3 --version 2>&1 | grep -F "3.9.18" |
0 commit comments