Skip to content

Update with earlier versions, remove major version #8

Update with earlier versions, remove major version

Update with earlier versions, remove major version #8

name: Compatibility Matrix
on:
push:
branches:
- github-ci
jobs:
CompatibilityMatrix:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11, 3.12, 3.x]
env:
MUST_RUN_VERSION: "3.12"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Get Python version
id: python_version
run: |
python --version
- name: Check if Python versions match
id: check_version
run: |
if [[ "${{ matrix.python-version }}" == "3.x" ]]; then
PYTHON_VERSION=$(python --version | grep -oP '(?<=Python\s)[\d.]+')
if [[ "$PYTHON_VERSION" == "${{ env.MUST_RUN_VERSION }}."* ]]; then
echo "skip-job=true" >> $GITHUB_ENV
fi
fi
- name: Install dependencies
if: env.skip-job != 'true'
run: |
pip install poetry
poetry install --with dev
- name: Check for outdated dependencies
if: env.skip-job != 'true'
run: |
poetry show --outdated --only main
- name: Update dependencies to the latest allowed versions
if: env.skip-job != 'true'
run: |
poetry update
echo "Dependencies updated"
- name: Run tests
if: env.skip-job != 'true'
run: |
poetry run pytest
continue-on-error: false