- Sixteen setup-python steps move from '3.12' to '3.15'. codeql.yml alone stays on '3.14': CodeQL's supported-languages page lists Python up to 3.14 and its extractor runs on that interpreter; the pipeline uses no 3.15-only syntax. - The updater-json job of release-desktop.yml sets up 3.15 instead of running the runner image's python3. - Four text-mode writes name encoding="utf-8": the dead-link log, both leaderboards and clear_temp(). 3.15 makes UTF-8 the default (PEP 686); on Windows an older Python writes cp1252, which cannot encode the leaderboards' emoji, so those scripts crashed there. CI already wrote UTF-8, so no committed output changes. - requirements.txt's compile line and sonar.python.version say 3.15. `uv pip compile --universal` gives the same lock for 3.12 and 3.15, and every pin installs on 3.15 with --require-hashes --only-binary :all: (charset-normalizer's cp315 wheels were already hashed). Checked on Python 3.15.1: the 299 tests pass with EncodingWarning and DeprecationWarning as errors; edit_game.py --check and delete_game.py --check pass; a full save_main(load_main()) on a copy of the data leaves all 36 files byte-identical to HEAD, as on 3.14, so no shard and no index.json changes when the data jobs move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.5 KiB
YAML
44 lines
1.5 KiB
YAML
name: Python Tests
|
|
|
|
# The pipeline had no tests at all. These start with the one contract a
|
|
# mistake in would silently strand every visitor on stale data: data/index.json
|
|
# (per-shard sha256, and last_updated changing only when a shard changes).
|
|
|
|
on:
|
|
pull_request:
|
|
paths: ['scripts/**', 'requirements*.txt', 'pyproject.toml', '.github/workflows/python-tests.yml']
|
|
push:
|
|
branches: [main]
|
|
paths: ['scripts/**', 'requirements*.txt', 'pyproject.toml', '.github/workflows/python-tests.yml']
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
# Reads nothing from data/ and writes nothing, so it does not join the
|
|
# data-write group.
|
|
group: python-tests-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.15'
|
|
# The data pipeline's own install line, exactly as bash/*.sh run it, so a
|
|
# Dependabot bump of requirements.txt is proven here before a data job
|
|
# meets it. Hash mode is all-or-nothing per pip call, hence the second
|
|
# call for the test tools.
|
|
- name: Install the pipeline's dependencies
|
|
run: |
|
|
pip install --quiet --require-hashes --only-binary :all: -r requirements.txt
|
|
- name: Install the test tools
|
|
run: |
|
|
pip install --quiet --require-hashes --only-binary :all: -r requirements-test.txt
|
|
- name: pytest
|
|
run: python -m pytest scripts/tests -q
|