Use Docker containers with official Python images to run tests across all Python versions from 3.6 to 3.14. This approach: - Eliminates "workers not found" errors from deprecated Ubuntu runners - Provides reliable support for older Python versions (3.6, 3.7) - Simplifies workflow configuration significantly - Uses official python:X.Y Docker images maintained by Python team - Sets fail-fast: false to test all versions independently
26 lines
521 B
YAML
26 lines
521 B
YAML
name: Run tests
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: python:${{ matrix.python-version }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements-dev.txt
|
|
|
|
- name: Run tests
|
|
run: |
|
|
python -m pytest -v
|