Skip to content

Commit ef98784

Browse files
edvilmeCopilot
andauthored
Use shared Python version check action (#26271)
## Summary - Replace the duplicated weekly Python version checker and shell issue-creation steps with the shared action from [microsoft/vscode-python-ci#4](microsoft/vscode-python-ci#4), pinned to `c1aa1190277c85c93ab142e8909bcd11453ce30b`. - Supply explicit workflow paths and Python matrix keys. - Preserve the Monday schedule, manual dispatch, checkout pin, repository-owner guard, permissions, concurrency, and `debt` / `python-version` issue labels. - Remove the obsolete local checker and its tests; the shared action owns the implementation and unit tests. ## Validation - Prettier passes for the changed workflow; YAML parsing and `git diff --check` pass. - Exercised the pinned checker in check-only mode against the actual configured workflows using Python.org release data. - Verified coverage matches the previous checker across all seven migrations: 14 workflows and 19 explicit matrices. - Verified issue creation arguments, repository, labels, and token forwarding with a mocked subprocess. No live issues were created. - The shared action's post-merge CI passed. ## Behavior change The shared action intentionally defers duplicate-issue detection. Issue creation remains enabled, so each scheduled/manual run with missing coverage creates an issue even if one already exists or was previously closed. Concurrency prevents overlapping runs, not duplicates across runs. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 956d3afd-ae0b-486c-a60c-3a6276c23213
1 parent 8885e47 commit ef98784

3 files changed

Lines changed: 9 additions & 282 deletions

File tree

‎.github/workflows/check-python-versions.yml‎

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -19,42 +19,13 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22-
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
22+
- name: Check supported Python versions
23+
uses: microsoft/vscode-python-ci/actions/check-python-versions@c1aa1190277c85c93ab142e8909bcd11453ce30b
2324
with:
24-
python-version: '3.15'
25-
- name: Check for a new Python version
26-
id: check
27-
shell: bash
28-
run: |
29-
version="$(python build/update_python_versions.py)"
30-
echo "version=$version" >> "$GITHUB_OUTPUT"
31-
- name: Create issue
32-
if: steps.check.outputs.version != ''
33-
env:
34-
GH_TOKEN: ${{ github.token }}
35-
VERSION: ${{ steps.check.outputs.version }}
36-
shell: bash
37-
run: |
38-
title="CI Python Versions: Update to Python $VERSION"
39-
issue_number="$(
40-
gh api --paginate \
41-
-H "X-GitHub-Api-Version: 2022-11-28" \
42-
"/repos/$GITHUB_REPOSITORY/issues?state=all&per_page=100" \
43-
--jq ".[] | select(has(\"pull_request\") | not) | select(.title == \"$title\") | .number"
44-
)"
45-
if [[ -z "$issue_number" ]]; then
46-
gh issue create \
47-
--title "$title" \
48-
--label debt \
49-
--label python-version \
50-
--body "Python $VERSION has a published release candidate according to the [Python.org downloads API](https://www.python.org/api/v2/downloads/release/?is_published=true&pre_release=true&version=3), but is missing from at least one CI test matrix.
51-
52-
### Requested changes
53-
- [ ] Ensure every explicit-version \`python\` matrix in \`.github/workflows/pr-check.yml\` includes Python $VERSION.
54-
- [ ] Ensure every explicit-version \`python\` matrix in \`.github/workflows/build.yml\` includes Python $VERSION.
55-
- [ ] Run the tests on Python $VERSION and resolve any compatibility failures.
56-
57-
Compare matrix entries by major.minor; patch and prerelease/dev variants of $VERSION already count as coverage. Add the version only where missing and preserve existing entries. Floating \`3.x\` entries do not declare release-candidate coverage.
58-
59-
Keep minimum-supported-version and build-runtime Python pins unchanged; adding CI coverage does not require raising the minimum supported Python version."
60-
fi
25+
files: |
26+
- path: .github/workflows/pr-check.yml
27+
key: python
28+
- path: .github/workflows/build.yml
29+
key: python
30+
token: ${{ github.token }}
31+
issue-labels: debt,python-version

‎build/test_update_python_versions.py‎

Lines changed: 0 additions & 143 deletions
This file was deleted.

‎build/update_python_versions.py‎

Lines changed: 0 additions & 101 deletions
This file was deleted.

0 commit comments

Comments
 (0)