From b32563ca318cb68f8daa36978d6aeff2da13b382 Mon Sep 17 00:00:00 2001 From: ChuckBuilds Date: Mon, 3 Aug 2026 16:24:09 -0400 Subject: [PATCH] ci: run the new suites, and check tag/version agreement at release time These were split out of #428/#429 because the token pushing them lacked the `workflow` scope. Folding them in here rather than opening a stacked PR -- #429 was merged into its stacked base after that base had already been squash-merged, so its content never reached main, and one such near-miss is enough. All three enrolled suites exist on this branch: test_version_consistency.py came with #428 and is on main; the other two arrive with the commits above. Enrolling them in a separate PR would have either raced with this one on test.yml or briefly pointed CI at files main did not have. - test.yml: enroll test_version_consistency, test_plugin_compatibility_gate and test_install_preserves_existing in the core unit job. Until now these 32 tests existed but nothing ran them automatically. - release-version-check.yml: run scripts/check_release_version.py on pushed v* tags and published releases, plus workflow_dispatch so a tag can be checked *before* it is created. No dependencies -- it reads src/__init__.py and CHANGELOG.md only. Verified: both workflow files parse, and the release check still passes for v3.2.0 against this tree. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Udr6MfaFLUPhX5Fgo67Jf5 --- .github/workflows/release-version-check.yml | 40 +++++++++++++++++++++ .github/workflows/test.yml | 5 ++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release-version-check.yml diff --git a/.github/workflows/release-version-check.yml b/.github/workflows/release-version-check.yml new file mode 100644 index 00000000..d9c6320a --- /dev/null +++ b/.github/workflows/release-version-check.yml @@ -0,0 +1,40 @@ +name: Release version check + +# A release tag, the CHANGELOG, and src.__version__ must agree. They have not +# always: v3.1.0 was tagged while src/__init__.py still said "1.0.0", which +# silently exempted every device installed from that release from plugin +# compatibility warnings. See docs/SPORTS_UNIFICATION.md (phase B4). +on: + push: + tags: ["v*"] + release: + types: [published] + # Pre-flight: run this against the tag you are about to create. + workflow_dispatch: + inputs: + tag: + description: "Tag to check (e.g. v3.2.0)" + required: true + type: string + +permissions: + contents: read + +jobs: + version-matches-tag: + name: Tag matches src.__version__ + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 + with: + python-version: "3.12" + + # No dependencies: the script reads src/__init__.py and CHANGELOG.md only. + - name: Assert the tag, CHANGELOG and src.__version__ agree + run: python scripts/check_release_version.py "${TAG}" + env: + TAG: ${{ inputs.tag || github.ref_name }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cfe31c17..76492edd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,4 +76,7 @@ jobs: test/test_sports_core_promotions.py \ test/test_sports_modes_promotions.py \ test/test_sports_capabilities.py \ - test/test_sports_scroll.py + test/test_sports_scroll.py \ + test/test_version_consistency.py \ + test/test_plugin_compatibility_gate.py \ + test/test_install_preserves_existing.py