Skip to content

CI: move the Joomla versions of the matrix into tests/ci/matrix.json - #247

Merged
codeling merged 1 commit into
mainfrom
matrix-json
Oct 27, 2026
Merged

codeling merged 1 commit into
mainfrom
matrix-json

Conversation

@codeling

Copy link
Copy Markdown
Owner

Problem

The joomla-versions workflow could not push its version bump:

! [remote rejected] joomla-versions -> joomla-versions (refusing to allow a GitHub App to create or update workflow `.github/workflows/ci.yml` without `workflows` permission)

A push made with a workflow's GITHUB_TOKEN is refused if it changes any file under .github/workflows/, and that token can't be given the workflows permission. The bump edited the Joomla versions in the matrix of ci.yml.

Change

The matrix is a data file, tests/ci/matrix.json, instead of part of the workflow file:

  • ci.yml: a first job "Test matrix" reads the file (jq) and the integration job uses it (needs: matrix, matrix: ${{ fromJson(...) }}). The integration job names (Joomla 5.4.8, mysql:8.0, PHP 8.2, ...) and the combinations are unchanged.
  • tests/ci/joomla-updates.php (plan/apply) and tests/lint/check-joomla-checksums.php read and write the JSON. The lint also checks the file's structure (valid JSON, non-empty include, joomla/php/db strings, versions look like versions, checksum present).
  • joomla-versions.yml and tests/README.md updated (also says: use "Run workflow", not "Re-run", to run the current workflow file).

The bot's commit now only touches tests/ci/matrix.json and tests/ci/joomla-checksums.sha256: no secret, no token that can change workflows.

Tested

  • Unit tests: 143 run (21 skipped without a component checkout), including the updated JoomlaUpdatesTest (16 tests; a new one covers unusable matrix files, which found and fixed a warning for {"include": "x"}; the apply test now checks that nothing but the version changes, formatting included).
  • Lint run on good and bad files (unlisted version, missing key, invalid JSON).
  • plan + apply on the real matrix.json with a synthetic release list (5.4.8 -> 5.4.10, 6.1.3 -> 6.1.4, new line 6.2), then the jq of the matrix job on the result and the lint.
  • The three run blocks of joomla-versions.yml against a throwaway git remote with a fake gh/curl: the commit contains exactly those two files, the branch is pushed, PR/issue/CI dispatch requested.
  • YAML validity of both workflows (this caught a : problem in the new run: line, fixed).

The jobs of this PR are the first real run of the new "Test matrix" job.

After merging

Run "Joomla versions" from the Actions tab (Run workflow, branch main): it should now push the branch and open a PR for 5.4.10 / 6.1.4. The 6.2 issue (#246) exists already and won't be duplicated.


Generated by Claude Code

The joomla-versions workflow can't push its version bump: a push made with a
workflow's GITHUB_TOKEN is refused if it changes a file under
.github/workflows ("refusing to allow a GitHub App to create or update
workflow ... without `workflows` permission"), and that token can't be given
the permission. The bump edited the matrix in ci.yml.

The matrix is now a data file, tests/ci/matrix.json. ci.yml reads it in a
first job ("Test matrix") and the integration job takes it from there; names
of the integration jobs are unchanged. The version bot (joomla-updates.php)
and the checksum lint read and write the JSON, so the bot's commit only
touches matrix.json and joomla-checksums.sha256.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhhhdjhErC9ZiaS4HyRjsh
@codeling
codeling merged commit 33974d0 into main Oct 27, 2026
10 checks passed
@codeling
codeling deleted the matrix-json branch October 27, 2026 16:17
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