Skip to content

Merge pull request #21 from kishaningithub/use-unmanaged-installation #207

Merge pull request #21 from kishaningithub/use-unmanaged-installation

Merge pull request #21 from kishaningithub/use-unmanaged-installation #207

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
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 sudo tar gzip which
- name: Checkout
run: |
git clone --depth 1 -b "${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}" "https://github.com/${GITHUB_REPOSITORY}.git" .
- 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_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 sudo tar gzip which
- name: Checkout
run: |
git clone --depth 1 -b "${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}" "https://github.com/${GITHUB_REPOSITORY}.git" .
- 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 sudo tar gzip which
- name: Checkout
run: |
git clone --depth 1 -b "${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}" "https://github.com/${GITHUB_REPOSITORY}.git" .
- 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)"