Skip to content

CI: add concurrency key #94

CI: add concurrency key

CI: add concurrency key #94

Workflow file for this run

name: Testing python-mode
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-python-versions:
runs-on: ubuntu-latest
strategy:
matrix:
python_version:
- short: "3.10"
full: "3.10.13"
- short: "3.11"
full: "3.11.9"
- short: "3.12"
full: "3.12.4"
- short: "3.13"
full: "3.13.0"
fail-fast: false
name: Test Python ${{ matrix.python_version.short }} (${{ matrix.python_version.full }})
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: |
docker compose build -q \
--build-arg PYTHON_VERSION="${{ matrix.python_version.full }}" \
--build-arg PYTHON_VERSION_SHORT="${{ matrix.python_version.short }}" \
python-mode-tests
- name: Run tests with Python ${{ matrix.python_version.short }}
run: |
docker compose run --rm \
-e PYTHON_VERSION="${{ matrix.python_version.full }}" \
-e PYTHON_VERSION_SHORT="${{ matrix.python_version.short }}" \
python-mode-tests