Skip to content

Mago migration: direct mago calls, job-split, Codecov/Infection support - #3

Merged
tyrsson merged 2 commits into
0.1.xfrom
expand-tooling
Aug 10, 2026
Merged

Mago migration: direct mago calls, job-split, Codecov/Infection support#3
tyrsson merged 2 commits into
0.1.xfrom
expand-tooling

Conversation

@tyrsson

Copy link
Copy Markdown
Member

What

  • Renames qa.ymlcontinuous-integration.yml, replaces composer cs-check/composer static-analysis steps with direct mago format --check/mago lint/mago analyze calls, and adds a mago guard step.
  • Splits the workflow into four jobs: mago, test, codecov, mutation-test.
    • mago and test run in parallel — no data dependency between them.
    • test runs a php x [lowest, locked, latest] matrix, supports an optional DB service via a generic manual docker run step (works for any RDBMS engine, not just MySQL), and collects coverage on one canonical leg.
    • codecov and mutation-test both needs: [test] (real dependencies — artifact consumption / gating), each independently toggle-able via enable-codecov / enable-infection.
  • Adds docs/workflow-architecture.md documenting the full job graph, DB-service mechanics, and Codecov/Infection secrets wiring (CODECOV_TOKEN org-wide + slug: ${{ github.repository }}; INFECTION_DASHBOARD_API_KEY per-repo via env:).
  • Updates README.md's usage example accordingly.

Why

First step in migrating php-db repos off laminas-coding-standard/PHPStan onto Mago, matching the direct-CLI-invocation approach already agreed on (no more calling mago through composer scripts in CI). The job-split unblocks driver packages (starting with phpdb-mysql) that need a seeded RDBMS for integration tests plus Codecov/Infection, without dragging that complexity into packages that don't need it (e.g. the base phpdb package).

Scope notes

  • No changes to mago.toml, docs/migration.md, docs/rules.md, or templates/phpunit.xml.dist — those already reflect the shared-base design from PR Add QA config, shared workflows and docs #1.
  • This is a config/tooling-only change — no source changes.

- Rename qa.yml to continuous-integration.yml
- Replace composer cs-check/static-analysis steps with direct mago
format/lint/analyze calls, and add a mago guard step
- Document the planned job-split design for DB service + Codecov +
Infection support in docs/workflow-architecture.md
Splits the reusable continuous-integration.yml into four jobs (mago, test,
codecov, mutation-test) so driver packages can run DB-backed integration
tests and optionally enable Codecov/Infection, without dragging that
complexity into packages that don't need it (e.g. the base phpdb package).
- mago and test run in parallel (no data dependency between them)
- test collects coverage on one canonical php-versions leg and uploads it
as an artifact
- codecov and mutation-test both needs:[test] (real dependencies: artifact
consumption / gating), each independently toggle-able per consumer
- DB service is a manual docker run step (not native services:) since env
var key names differ per RDBMS engine and can't be expressed generically
through a static services.<id>.env map
- Documents the design in docs/workflow-architecture.md and updates the
README's usage example accordingly
@tyrssontyrsson self-assigned this Aug 10, 2026
@tyrssontyrsson added the enhancement New feature or request label Aug 10, 2026
@tyrsson
tyrsson merged commit 8680ae5 into 0.1.xAug 10, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@tyrsson