Skip to content

ci: small matrix on pull requests, full matrix on main, nightly and releases - #45

Merged
tae898 merged 2 commits into
mainfrom
ci/selective-matrix
Oct 25, 2026
Merged

tae898 merged 2 commits into
mainfrom
ci/selective-matrix

Conversation

@tae898

@tae898 tae898 commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

What

A pull request now runs a small test matrix. Push to main, the nightly schedule, a manual dispatch and the release workflow run the full matrix exactly as before.

ArcadeData's org shares one runner cap with upstream ArcadeDB, so every macOS or Windows leg a pull request starts can delay upstream jobs. This builds on #38 (docs-only and draft PRs skip, superseded PR runs cancel); all of that stays.

Which legs run

Event Unit tests (Test arcadedb) Examples (Test Python Examples)
pull_request linux/amd64 x 3.10-3.14, and linux/arm64, darwin/arm64, windows/amd64 x 3.10 and 3.14 = 11 legs all four platforms x 3.14 = 4 legs
push to main, schedule, workflow_dispatch, workflow_call from release.yml 20 legs (4 platforms x 5 Pythons) 20 legs

The examples keep all four platforms on pull requests because they have platform-specific code: os.name == "nt" branches in examples 07 to 12, and per-platform workflow steps (CPU torch index on macOS, UTF-8 on Windows).

Check counts (counted from the YAML, old versus new, jobs with a matrix counted per leg)

Event Before After
Non-draft pull request 46 21
Push to main / nightly / dispatch / release 46 46

A pull request now runs 21 checks: 11 + 4 test legs, 2 x Download ArcadeDB JARs, 2 summary jobs, Bandit security scan and Dependency floor audit. The test legs go from 40 to 15, and the macOS and Windows legs from 20 to 6. A merge waiter should require at least 21 checks on a non-draft PR that touches more than docs; a docs-only or draft PR runs fewer, as before.

How

  • scripts/select_matrix.py holds the platform and Python lists and the pull request selection, and prints the strategy.matrix JSON for the event. Any event other than pull_request (including one it does not know) gets the full matrix.
  • The first job of each workflow, Download ArcadeDB JARs, runs it in a new first step and exposes the result as a job output. The test job uses matrix: ${{ fromJSON(needs.download-jars.outputs.matrix) }}. No extra job, so no extra runner, and the existing job names are unchanged.
  • Each leg still carries platform, runs-on and python-version, so the check names stay Test arcadedb (<platform>, Python <version>) and Test Python Examples (<platform>, Python <version>), and their history stays comparable. main is not branch-protected, so dropping PR legs cannot block a merge.
  • release.yml calls both workflows with workflow_call, where github.event_name is the caller's event (a tag push), so a release still builds all 20 wheels that verify-wheels counts. Only a comment there changed.
  • There are no Python 3.15 legs in either workflow (3.15 appears only in two build comments about JPype), so there was nothing to move.

Tests and lint

  • tests/test_select_matrix.py (21 cases, written first; the wiring cases failed before the workflow edit): the full matrix is written out independently and must equal 4 x 5 for every non-PR event and an unknown one; the PR matrices are exact and a subset of the full one; the Python list equals the pyproject.toml classifiers (release.yml counts wheels from them); both workflows take their matrix from the script and keep no copy of the lists.
  • actionlint 1.7.12 (the pre-commit rev) is clean on all three workflows; black, isort and Bandit are clean on the new files.
  • This PR's own run is the live check that the PR matrix expands as above.

Docs

New page development/ci.adoc (in the nav) describing what runs when and how to change the selection. The three "CI runs all five versions on every platform" sentences (README, index.adoc, installation.adoc) now say for main, the nightly run and each release, and CLAUDE.md's CI section has the new rule.

🤖 Generated with Claude Code

tae898 and others added 2 commits October 25, 2026 15:33
…d releases

The organisation shares one runner cap with ArcadeData/arcadedb, so every extra
macOS or Windows leg on a pull request delays upstream too.

scripts/select_matrix.py picks the legs from the event name. A pull request runs
linux/amd64 on Python 3.10-3.14 and the other three platforms on 3.10 and 3.14
(bindings, 11 legs), and all four platforms on 3.14 (examples, 4 legs). Every
other event, including the release workflow's workflow_call, runs all 20 legs of
each workflow as before. The first job of each workflow runs the script and the
test job takes its matrix from that job's output, so the job names stay
"Test arcadedb (<platform>, Python <version>)".

A pull request now runs 21 checks instead of 46. tests/test_select_matrix.py
pins the full matrix at 20 legs and checks the Python list against the
pyproject classifiers. New docs page development/ci.adoc.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…matrix

tomllib is not in Python 3.10, so the file failed to collect on every 3.10 leg
(linux/amd64, linux/arm64, windows/amd64). A regex over the classifier lines
does the same check.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tae898
tae898 merged commit 4a549bd into main Oct 25, 2026
21 checks passed
@tae898
tae898 deleted the ci/selective-matrix branch October 25, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant