Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.repository }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
python-version: ${{ github.event_name == 'pull_request' && fromJSON('["3.14"]') || fromJSON('["3.11", "3.12", "3.13", "3.14"]') }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document the reduced pre-merge Python matrix

On pull requests this now runs Office verification only on Python 3.14, but the canonical verification guidance still says CI executes the complete 3.11–3.14 matrix (office/README.md:273-275) and that normal exact-head CI retains those gates (docs/print-output.md:46). Because the new test treats this PR/main split as a durable workflow contract, update the smallest affected canonical test-strategy or verification documentation to make clear that compatibility failures on 3.11–3.13 are detected only after merge.

AGENTS.md reference: AGENTS.md:L5-L9

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the Office matrix contract test

With this expression in place, every Office job fails its own coverage run -m pytest: office/tests/test_python_support_contract.py:53-56 requires python-version to be followed directly by a literal YAML list, so it cannot match this ${{ ... }} value and fails at assert matrix_match is not None. Update that contract test to validate the event-dependent PR/main matrices before switching the workflow representation.

AGENTS.md reference: AGENTS.md:L5-L9

Useful? React with 👍 / 👎.

defaults:
run:
working-directory: office
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
contents: read

concurrency:
group: release-${{ github.ref_name }}
group: ${{ github.workflow }}-${{ github.repository }}-${{ github.ref_name }}
cancel-in-progress: false

env:
Expand Down Expand Up @@ -724,4 +724,4 @@ jobs:
done

echo "::error::Registry publication verification did not converge to the exact artifact digests."
exit 1
exit 1
14 changes: 14 additions & 0 deletions src/workflowExactHead.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,20 @@ const browserJob = workflowJob(workflow, 'browser-release-evidence', 'office');
const officeJob = workflowJob(workflow, 'office');

describe('exact-head CI workflow contract', () => {
it('cancels only superseded runs for the same repository and PR while keeping full main compatibility coverage', () => {
expect(workflow).toContain(
"group: ${{ github.workflow }}-${{ github.repository }}-${{ github.event.pull_request.number || github.ref }}",
);
expect(workflow).toContain('cancel-in-progress: true');
expect(officeJob).toContain(
"python-version: ${{ github.event_name == 'pull_request' && fromJSON('[\"3.14\"]') || fromJSON('[\"3.11\", \"3.12\", \"3.13\", \"3.14\"]') }}",
);
expect(releaseWorkflow).toContain(
'group: ${{ github.workflow }}-${{ github.repository }}-${{ github.ref_name }}',
);
expect(releaseWorkflow).toContain('cancel-in-progress: false');
});

it('uses a fixed runner and checks out the immutable current PR head in every job', () => {
expect(workflow).not.toContain('ubuntu-latest');
for (const job of [buildJob, browserJob, officeJob]) {
Expand Down
Loading