Skip to content

Commit

Permalink
Simplify matrix script
Browse files Browse the repository at this point in the history
  • Loading branch information
cscollett committed Aug 19, 2024
1 parent 8e183af commit f9a9fbd
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/compatability-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ jobs:

strategy:
matrix:
python-version: [3.12, 3.x]
python-version: [3.12]
update-strategy: [none, minor, major]

env:
MUST_RUN_VERSION: "3.12"

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -31,23 +28,12 @@ jobs:
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 Poetry
if: env.skip-job != 'true'
run: |
pip install poetry
- name: Install dependencies
if: env.skip-job != 'true'
run: |
if [[ "${{ matrix.update-strategy }}" == "none" ]]; then
poetry install --no-update --with dev
Expand All @@ -58,7 +44,6 @@ jobs:
fi
- name: Run tests
if: env.skip-job != 'true'
run: |
poetry run pytest
continue-on-error: false

0 comments on commit f9a9fbd

Please sign in to comment.