Skip to content

[Test Runner and CI]: Python 3.13 Upgrade #220

[Test Runner and CI]: Python 3.13 Upgrade

[Test Runner and CI]: Python 3.13 Upgrade #220

Workflow file for this run

---
name: CI
on:
pull_request:
branches:
- main
paths-ignore:
- '.gitignore'
- 'LICENSE'
- '**.md'
jobs:
build:
name: Test Runner
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435
with:
install: true
- name: Build Docker image and store in cache
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
with:
context: .
push: false
load: true
tags: exercism/python-test-runner
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Tests in Docker
run: bin/run-tests-in-docker.sh
housekeeping:
name: Python Content Validation
runs-on: ubuntu-24.04
container:
image: python:3.13.5-alpine3.22
steps:
- name: Checkout Runner Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Checkout Problem Specs
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: exercism/problem-specifications
ref: main
path: 'problem-specifications'
- name: Checkout Exercises
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: exercism/python
ref: main
path: 'python'
- name: Install Dependencies
run: |
pip install -r requirements-generator.txt
- name: Generate Tests from Templates
run: |
bin/generate_tests.py --verbose -p ./problem-specifications --check
- name: Lint Practice Exercises and Data with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./python/exercises/practice --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./python/exercises/practice --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Check Exercise Examples against Tests Using Test Runner
run: |
cd python
../bin/test_exercises.py --runner test-runner