Skip to content

ci: DRY the compat fixture matrix between fixtures.yaml and refresh workflow #82

Description

@phramz

Context

.github/workflows/compat-golden-refresh.yml re-encodes the 8 axis-representative fixtures' inputs (extensions, ini-values, coverage, ini-file) at workflow lines ~66-74. Those inputs are also the source of truth in test/compat/fixtures.yaml for the entries marked compat: true.

If a fixture's inputs change, both places need updating in lockstep. Practical risk is low (fixture definitions are stable), but it violates DRY and is a footgun for a future maintainer adding a new compat fixture.

Options

(a) Add a phpup internal list-compat-fixtures --as-json-matrix subcommand that emits the matrix shape at workflow runtime. The refresh workflow would have a setup step that runs the subcommand and feeds its output into the matrix via fromJson().

(b) Use a YAML-to-matrix shim — e.g., yq to extract the 8 compat fixtures from fixtures.yaml and reshape into the matrix's {name, php, extensions, ini_values, coverage, ini_file} row format.

Option (a) is more discoverable; option (b) is zero new Go code.

Acceptance

  • Removing/adding a fixture's compat: true flag in test/compat/fixtures.yaml is the only change needed to update the refresh workflow's matrix
  • compat-golden-refresh weekly run still captures the right set

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions