Skip to content

Skip in-build wheel tests off-tag - #300

Merged
bdraco merged 3 commits into
masterfrom
ci-skip-wheel-tests-off-tag
Sep 15, 2026
Merged

bdraco merged 3 commits into
masterfrom
ci-skip-wheel-tests-off-tag

Conversation

@bdraco

@bdraco bdraco commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

What do these changes do?

The wheel build jobs ran the test suite against every wheel they built, and the test matrix then installed those same wheels and ran the suite again. Off-tag the wheel jobs now set CIBW_TEST_SKIP to * and only build, and they build only the arm64 macOS wheels the matrix runs on. The matrix gains 3.15 and 3.15t rows, since cibuildwheel builds those wheels too, so everything built off-tag is still tested, now in parallel instead of serialized behind each build. Tag builds are unchanged and still build every architecture and test every wheel.

The workflow also mixed contains(github.ref, 'refs/tags/') and github.ref_type for the same release check. They all use github.event_name == 'push' && github.ref_type == 'tag' now, or its negation; the push check stays because tags also produce create events.

Are there changes in behavior for the user?

No, this only affects CI.

Related issue number

N/A; same change as aio-libs/yarl#1885 and aio-libs/yarl#1892.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist (N/A, CI only change)
  • Documentation reflects the changes (N/A)
  • Add a new news fragment into the CHANGES/ folder

The wheel build jobs ran the test suite against every wheel, and the
test matrix then installed those same wheels and ran it again. Off-tag
the wheel jobs now only build; the test matrix keeps the coverage.

The workflow also mixed contains(github.ref, 'refs/tags/') and
github.ref_type for the same release check; all of them now use
github.event_name == 'push' && github.ref_type == 'tag'.
@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label Sep 15, 2026
@bdraco
bdraco marked this pull request as ready for review September 15, 2026 17:58
@codspeed

codspeed Bot commented Sep 15, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing ci-skip-wheel-tests-off-tag (2e92536) with master (19f4e0e)1

Open in CodSpeed

Footnotes

  1. No successful run was found on master (e514a4f) during the generation of this report, so 19f4e0e was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@codecov

codecov Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e514a4f) to head (0895f7d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #300   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          532       532           
  Branches        27        27           
=========================================
  Hits           532       532           
Flag Coverage Δ
CI-GHA 98.30% <ø> (ø)
OS-Linux 98.30% <ø> (ø)
OS-Windows 95.86% <ø> (ø)
OS-macOS 95.86% <ø> (ø)
Py-3.10 95.86% <ø> (ø)
Py-3.11 97.18% <ø> (ø)
Py-3.12 97.18% <ø> (ø)
Py-3.13 97.18% <ø> (ø)
Py-3.14 97.16% <ø> (ø)
Py-3.14t 97.16% <ø> (ø)
Py-3.15 97.16% <ø> (?)
Py-3.15t 97.16% <ø> (?)
Py-pypy-3.10 82.33% <ø> (ø)
VM-macos-latest 95.86% <ø> (ø)
VM-ubuntu-latest 98.30% <ø> (ø)
VM-windows-11-arm 95.67% <ø> (ø)
VM-windows-latest 95.86% <ø> (ø)
pytest 98.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps

greptile-apps Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5

Safe to merge.

No outstanding issues remain. The earlier macOS wheel-coverage concern is addressed: off-tag builds now produce only arm64, the architecture covered by the downstream macOS test job, while tag pushes retain x86_64, arm64, and universal2 builds. greptile-apps[bot] resolved the earlier thread without explanation.

Reviews (2): Last reviewed commit: "Keep every wheel covered off-tag" | Re-trigger Greptile

Comment thread .github/workflows/ci-cd.yml Resolved
@aiolibsbot

Copy link
Copy Markdown
Contributor

PR Review — Skip in-build wheel tests off-tag

The change is small, cuts CI time and is safe to merge. Two non-blocking notes, one about test coverage and one about maintenance.

What works well:

  • Tag builds keep the full in-build test run, because an empty wheel-tests-to-skip skips the new step entirely. The pyproject.toml test-skip for armv7l still applies on releases.
  • The new step passes the input through an env: variable instead of putting ${{ }} straight into the shell. That is safer than the existing CIBW_SKIP step.
  • All release checks now use github.event_name == 'push' && github.ref_type == 'tag' or its negation. A grep confirms no contains(github.ref, 'refs/tags/') is left under .github/. Keeping the push check for create events is correct.
  • The news fragment is in the right category (contrib), written in past tense, signed, and puts github.ref_type in double backticks so the spell check won't flag it.

Worth a look:

  • Off-tag, macOS x86_64 wheels are still built but no longer tested. cibuildwheel used to test them under Rosetta, and the test matrix only runs arm64 macOS. So the claim that the matrix covers every ABI isn't quite right. Separately, I couldn't confirm whether cibuildwheel v4.2.1 builds cp315 here; yarl had to add 3.15 rows for that.
  • A non-empty wheel-tests-to-skip replaces pyproject's test-skip instead of adding to it. That's harmless with *, but a narrower selector later would drop the armv7l skip.

🟢 Suggestions

1. Off-tag, macOS x86_64 wheels are no longer tested anywhere
.github/workflows/ci-cd.yml:278-283

The PR says the test matrix "already covers every ABI they produce". That isn't quite true on macOS.

  • reusable-build-wheel.yml:127 sets CIBW_ARCHS_MACOS: x86_64 arm64 universal2. Off-tag, only *-macosx_universal2 is added to CIBW_SKIP, so the macos-latest job still builds x86_64 wheels.
  • The test matrix runs only on macos-latest, which is an arm64 runner. uv pip install --find-links=./dist picks the arm64 wheel there, so the x86_64 wheels never get installed.
  • Before this change, cibuildwheel tested those x86_64 wheels inside the build job, under Rosetta on the arm64 runner. With CIBW_TEST_SKIP=*, nothing tests them on PRs or master pushes.

Impact: an x86_64-only macOS breakage in the C extension (compiler flags, alignment, and so on) would first show up when a release tag is pushed. That blocks the release instead of failing a PR. The wheels are uploaded as artifacts either way.

Possible fixes (pick one):

  • Skip tests only for ABIs the matrix really installs. For example, pass something like *-manylinux_x86_64 *-win_amd64 *-win_arm64 *-macosx_arm64 instead of *, so cibuildwheel still tests x86_64 macOS wheels.
  • Add a macos-15-intel / macos-13 row to the test matrix.
  • Keep the change as is, but reword the PR description and news fragment so they don't say every ABI is still covered.

Unverified, worth checking: yarl#1885 had to add 3.15/3.15t rows so the 3.15 wheels stayed covered. This test matrix stops at 3.14/3.14t, and pyproject.toml has no enable setting. If pypa/[email protected] builds cp315 by default, those wheels have also lost off-tag coverage. The macos-latest build log from this PR's CI run would show which identifiers were built.

      wheel-tests-to-skip: >-  # Off-tag, the `test` job tests these wheels
        ${{
        (github.event_name != 'push' || github.ref_type != 'tag')
        && '*'
        || ''
        }}
2. `wheel-tests-to-skip` replaces pyproject's `test-skip` instead of adding to it
.github/workflows/reusable-build-wheel.yml:49-53

Environment variables take priority over pyproject.toml in cibuildwheel. Any non-empty value of this input therefore replaces test-skip = "*t-musllinux_armv7l" (pyproject.toml:77); it doesn't add to it.

Today the only values passed are * and '', so nothing breaks. * is a superset, and an empty value skips the step.

The input looks like a general selector list, though. If someone later passes a narrower pattern (for example, from the odd-arch job), the armv7l free-threaded skip silently goes away. That emulated test crashes with SIGBUS, which would turn release builds red.

Suggested fix: say this in the input description, e.g. Wheel tags to skip testing; overrides tool.cibuildwheel.test-skip. If the macOS finding above leads to a narrower selector, include *t-musllinux_armv7l in it.

      wheel-tests-to-skip:
        description: Wheel tags to skip testing
        default: ''
        required: false
        type: string

Checklist

  • No hardcoded secrets
  • No shell injection via workflow input interpolation
  • PR description matches the diff — suggestion #1
  • No untested build outputs introduced by the change — suggestion #1
  • Existing cibuildwheel config (test-skip) preserved — suggestion #2
  • CHANGES fragment present and follows conventions
  • Release gating (deploy, tracing, coverage plugin) unchanged in behavior

Automated review by Kōan (Claude) HEAD=2e92536 2 min 33s

cibuildwheel builds 3.15 and 3.15t wheels, and the macOS job built
x86_64 wheels that only ever ran under Rosetta inside the build. With
the in-build tests skipped, neither was tested off-tag.

Add 3.15 and 3.15t to the test matrix, and build only arm64 macOS
wheels off-tag, so everything built off-tag is also tested.
@codspeed

codspeed Bot commented Sep 15, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing ci-skip-wheel-tests-off-tag (0895f7d) with master (e514a4f)

Open in CodSpeed

@bdraco
bdraco merged commit 36b96a5 into master Sep 15, 2026
62 checks passed
@bdraco
bdraco deleted the ci-skip-wheel-tests-off-tag branch September 15, 2026 18:34
@nsoranzo nsoranzo mentioned this pull request Sep 23, 2026
30 of 43 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants