Skip to content

ci: migrate to GitHub Actions, make tests a hard gate, add agent guides - #38

Merged
Patrick Gugelsberger (Patrick-Gugelsberger) merged 5 commits into
developfrom
agentic_optimization
Jul 21, 2026
Merged

Patrick Gugelsberger (Patrick-Gugelsberger) merged 5 commits into
developfrom
agentic_optimization

Conversation

@Patrick-Gugelsberger

@Patrick-Gugelsberger Patrick Gugelsberger (Patrick-Gugelsberger) commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Deterministic tests — pin date.timezone=UTC in phpunit.xml.dist. Doctrine DBAL's datetime type is tz-naive, so DateTime round-trips through SQLite failed on non-UTC hosts. With this fixed, tests is now a hard gate (no more allow_failure/continue-on-error).
  • Static-analysis cleanup — resolve pre-existing phpcs (13) and phpstan level-max (9) violations so both can gate CI. No behavioural change (dead is_array() removal, mixed guards in LanguageIsoSubscriber, bogus @throws removal, FQ constant/alignment/ordering).
  • Docs — add a root + per-subsystem CLAUDE.md set describing the code map, standards, architecture, and directory conventions for agentic work.

Verification

Run locally on a non-UTC host (TZ=America/Los_Angeles) and green:

  • composer phpcs — PASS
  • composer phpstan (level max) — PASS
  • composer tests — PASS

🤖 Generated with Claude Code

Replace .gitlab-ci.yml with .github/workflows/ci.yml. Jobs: no-cruft,
phpcs, phpstan, and tests on a PHP 8.3/8.4 matrix.

Drop GitLab-only steps (auto-create-MR, codeclimate report combine,
private-registry auth) — all dependencies resolve from Packagist. Correct
the test matrix to 8.3/8.4 to match the ">=8.3" requirement in composer.json.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Doctrine DBAL's datetime type is timezone-naive, so DateTime values written
to and read back from SQLite lose their offset and compare unequal on any
non-UTC host — the dbc mapping-table tests failed accordingly.

Pin date.timezone to UTC in phpunit.xml.dist so tz-sensitive round-trips are
deterministic, allowing the tests job to be a hard CI gate instead of
allow_failure / continue-on-error.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Clears pre-existing static-analysis errors so phpcs and phpstan can run as
hard CI gates. No behavioural change.

- phpcs: fully-qualify \JSON_THROW_ON_ERROR, fix @throws ordering and
  assignment alignment in LanguageIsoSubscriber(Test).
- phpstan: drop is_array() checks already guaranteed by the @var array-shape
  annotations (ConnectorController::features, CrossSellingSubscriber) — they
  were provably always true.
- phpstan: guard LanguageIsoSubscriber against mixed event data (is_array /
  is_string) before offset access and Service::fromISO_639_2b().
- phpstan: remove bogus @throws tags (AnnotationException and the unqualified
  InvalidArgumentException) that resolved to non-existent, non-Throwable types.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add a root CLAUDE.md plus per-subsystem guides across src/ and tests/,
describing the code map, coding standards, architecture, and directory-
specific conventions for agentic work.

Document the GitHub Actions CI (all four jobs as hard gates) and the UTC
test-timezone pinning. No ADLC/PM-workflow references — this repo does not
use that pipeline.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

2 participants