Merge pull request #12 from kishaningithub/upgrade-python-versions #190
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: [ push ] | |
env: | |
# This is required to support GLIB versions present in amazon linux 2. Can be removed once amazon linux 2 is 💀 | |
# More info | |
# - https://github.com/actions/checkout/issues/1809#issuecomment-2208202462 | |
# - https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/ | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
jobs: | |
test_python_installation: | |
strategy: | |
fail-fast: false | |
matrix: | |
# This tests the amazon linux versions receiving standard support | |
# Refer - https://endoflife.date/amazon-linux | |
amazon-linux-version: [ 2, 2023 ] | |
# This tests the lowest supported python version and the latest stable python version | |
# Refer - https://devguide.python.org/versions/#status-of-python-versions | |
python-version: [ 3.8.18, 3.12.0 ] | |
cache: [ true, false ] | |
runs-on: ubuntu-latest | |
container: amazonlinux:${{ matrix.amazon-linux-version }} | |
steps: | |
- name: Setup runner | |
run: | | |
yum install -y git tar gzip sudo which | |
- uses: actions/checkout@v3 | |
- name: Install python | |
uses: ./ | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: ${{ matrix.cache }} | |
- name: Test installation | |
run: | | |
set -x | |
which python3 | |
which python | |
python3 --version | |
python --version | |
python3 --version 2>&1 | grep -F "${{ matrix.python-version }}" | |
test "$(python3 -m pip --version)" = "$(pip3 --version)" | |
python --version 2>&1 | grep -F "${{ matrix.python-version }}" | |
test "$(python3 -m pip --version)" = "$(pip --version)" | |
test_abstract_version_specification: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- python-version: "3" | |
installed-python-version: "3.12.4" | |
- python-version: "3.12" | |
installed-python-version: "3.12.4" | |
- python-version: "3.11" | |
installed-python-version: "3.11.9" | |
- python-version: "3.10" | |
installed-python-version: "3.10.14" | |
- python-version: "3.9" | |
installed-python-version: "3.9.19" | |
- python-version: "3.8" | |
installed-python-version: "3.8.19" | |
runs-on: ubuntu-latest | |
container: amazonlinux:2023 | |
steps: | |
- name: Setup runner | |
run: yum install -y git tar gzip sudo | |
- uses: actions/checkout@v3 | |
- name: Install python | |
uses: ./ | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Test installation | |
run: | | |
set -x | |
python3 --version 2>&1 | grep -F "${{ matrix.installed-python-version }}" | |
test_pip_installs: | |
strategy: | |
fail-fast: false | |
matrix: | |
amazon-linux-version: [ 2, 2023 ] | |
python-version: [ "3.8", "3.9", "3.10", "3.11" , "3.12" ] | |
cache: [ true, false ] | |
runs-on: ubuntu-latest | |
container: amazonlinux:${{ matrix.amazon-linux-version }} | |
steps: | |
- name: Setup runner | |
run: | | |
yum install -y git tar gzip sudo | |
- uses: actions/checkout@v3 | |
- name: Install python | |
uses: ./ | |
with: | |
python-version: "${{ matrix.python-version }}" | |
cache: ${{ matrix.cache }} | |
- name: Test installation | |
run: | | |
set -x | |
pip install requests | |
pip3 install s4cmd | |
pip3 install boto3 | |
test_python_version_file: | |
runs-on: ubuntu-latest | |
container: amazonlinux:2023 | |
steps: | |
- name: Setup runner | |
run: | | |
yum install -y git tar gzip sudo | |
- uses: actions/checkout@v3 | |
- name: Create python version file | |
run: | | |
echo '3.11.5' > .python-version | |
- name: Install python | |
uses: ./ | |
with: | |
python-version-file: ".python-version" | |
- name: Test installation | |
run: | | |
set -x | |
which python3 | |
which python | |
python3 --version | |
python --version | |
python3 --version 2>&1 | grep -F "3.11.5" | |
test "$(python3 -m pip --version)" = "$(pip3 --version)" | |
python --version 2>&1 | grep -F "3.11.5" | |
test "$(python3 -m pip --version)" = "$(pip --version)" |