Skip to content

Dockerize the test environment for better reproducibility #90

Dockerize the test environment for better reproducibility

Dockerize the test environment for better reproducibility #90

Workflow file for this run

name: Testing python-mode
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]
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: 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