Skip to content

Commit 72f58b7

Browse files
committed
Changes to tooling and tests for moving to Python 3.13
Fix requirements-generator file to fix markupsafe to 3.0.2 Upgraded version of tomli. copied content repo ci scripts over to test content Removed refs to python 3.7 Changed order of checkout action and python clone. Changed order of install Changed default spec path Relative path under github workspaces fuller path for requirements.txt Changed houskeeping job name to Python Content Validation. Removed template script from ci since it overlaps the other scripts already called. Removed docker-compose file and commented template_status on why it is not being used. Deleted run-exercise-tests-in-docker. Unneded.
1 parent 3f21bfc commit 72f58b7

File tree

25 files changed

+2428
-594
lines changed

25 files changed

+2428
-594
lines changed

.github/workflows/main.yml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-24.04
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
2020

2121
- name: Set up Docker Buildx
22-
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1
22+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435
2323
with:
2424
install: true
2525

@@ -35,3 +35,46 @@ jobs:
3535

3636
- name: Run Tests in Docker
3737
run: bin/run-tests-in-docker.sh
38+
39+
housekeeping:
40+
name: Python Content Validation
41+
runs-on: ubuntu-24.04
42+
container:
43+
image: python:3.13.5-alpine3.22
44+
steps:
45+
- name: Checkout Runner Code
46+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
47+
48+
- name: Checkout Problem Specs
49+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
50+
with:
51+
repository: exercism/problem-specifications
52+
ref: main
53+
path: 'problem-specifications'
54+
55+
- name: Checkout Exercises
56+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
57+
with:
58+
repository: exercism/python
59+
ref: main
60+
path: 'python'
61+
62+
- name: Install Dependencies
63+
run: |
64+
pip install -r requirements-generator.txt
65+
66+
- name: Generate Tests from Templates
67+
run: |
68+
bin/generate_tests.py --verbose -p ./problem-specifications --check
69+
70+
- name: Lint Practice Exercises and Data with flake8
71+
run: |
72+
# stop the build if there are Python syntax errors or undefined names
73+
flake8 ./python/exercises/practice --count --select=E9,F63,F7,F82 --show-source --statistics
74+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
75+
flake8 ./python/exercises/practice --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
76+
77+
- name: Check Exercise Examples against Tests Using Test Runner
78+
run: |
79+
cd python
80+
../bin/test_exercises.py --runner test-runner

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.11.5-alpine3.18
1+
FROM python:3.13.5-alpine3.22
22

33
COPY requirements.txt /requirements.txt
44

bin/.flake8

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[flake8]
2+
exclude =
3+
.git,
4+
__pycache__,
5+
test,
6+
bin,
7+
problem-specifications,
8+
python/bin,
9+
python/exercises/concept,
10+
runner,
11+
old,
12+
build,
13+
dist

0 commit comments

Comments
 (0)