Skip to content

chore/migrate CI from Travis to GitHub Actions#16

Merged
rick-lam merged 3 commits into
mainfrom
chore/migrate-ci-to-github-actions
May 7, 2026
Merged

chore/migrate CI from Travis to GitHub Actions#16
rick-lam merged 3 commits into
mainfrom
chore/migrate-ci-to-github-actions

Conversation

@rick-lam
Copy link
Copy Markdown
Contributor

@rick-lam rick-lam commented May 7, 2026

Summary

Travis CI no longer runs against this repo, so every PR ends up stuck without a build status. Replace .travis.yml with GitHub Actions so PR gating actually works again.

Notable changes

  • .github/workflows/ci.yml — runs on push to main and every pull request.
    • Test matrix: PHP 7.0–7.4 × prefer-lowest yes/no = 10 jobs. Mirrors the old Travis matrix and adds 7.4.
    • Steps: composer config platform.php $(php -v), then composer update, then phpcs + phpunit.
    • Adds composer config audit.block-insecure false before resolve so Composer 2.7+ doesn't refuse the pinned-by-design legacy phpunit and symfony/process versions. Step soft-fails on Composer < 2.7 (PHP 7.0/7.1 ship with Composer 2.2 via setup-php, which doesn't recognise the key but doesn't have the feature either).
    • lint-md job runs make lint-md (the existing Makefile target).
  • .github/workflows/docs.yml — runs on push to main, builds mkdocs, deploys to gh-pages via peaceiris/actions-gh-pages@v4. Replaces the old Travis Pages deploy stage.
  • Drop .travis.yml.
  • README: swap the Travis build-status badge for one pointing at ci.yml.

Dropped vs. the old Travis config

  • nightly PHP: was already allow_failures in Travis. Re-add later if desired.
  • Scrutinizer ocular coverage upload: re-add when/if Scrutinizer is still wanted; needs a token decision.

QA

  • Verified all 11 jobs go green
  • Markdown lint passes against the current docs tree.

Deployment

N/A — CI-only.

Travis CI no longer runs against the repo, so PRs cannot get a green
test status. Replace .travis.yml with two GitHub Actions workflows:

- .github/workflows/ci.yml runs on push to main and on every pull
  request. The test job matrices PHP 7.0–7.4 against prefer-lowest
  yes/no, runs phpcs and phpunit. The lint-md job runs the existing
  Makefile target. A composer step disables audit.block-insecure
  (added in Composer 2.7) so the resolver doesn't refuse the
  pinned-by-design legacy phpunit and symfony/process versions; the
  step soft-fails on Composer < 2.7 (used on PHP 7.0/7.1 via
  setup-php) since older composer doesn't have that feature anyway.

- .github/workflows/docs.yml runs on push to main, builds mkdocs and
  deploys to gh-pages via peaceiris/actions-gh-pages, replacing the
  old Travis Pages stage.

Drop nightly PHP and the Scrutinizer coverage upload — both can be
re-added later if desired; they're not load-bearing for the PR gate.

Replace the Travis build-status badge in README with one pointing at
the new ci.yml workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 7, 2026 09:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates the repository’s CI and docs deployment from Travis CI to GitHub Actions so PRs and main pushes regain automated status checks and docs publishing.

Changes:

  • Add GitHub Actions CI workflow to run composer update, phpcs, and phpunit across a PHP version × prefer-lowest matrix.
  • Add GitHub Actions workflow to build and publish mkdocs output to gh-pages.
  • Remove Travis configuration and update the README build badge to point at GitHub Actions.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
README.md Replaces the Travis badge with a GitHub Actions CI badge.
.travis.yml Removes the obsolete Travis CI configuration.
.github/workflows/ci.yml Introduces the GitHub Actions CI matrix for PHP + prefer-lowest and runs lint/tests.
.github/workflows/docs.yml Adds a GitHub Actions workflow to build and deploy mkdocs to gh-pages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/docs.yml Outdated
Comment thread README.md Outdated
rick-lam and others added 2 commits May 7, 2026 11:01
- Rename matrix key prefer-lowest -> prefer_lowest. Both work in
  practice (the SE2-752 trial run had all 11 jobs pass), but
  underscores are the documented convention for matrix variables
  referenced via dot-notation in expressions.

- Drop keep_files: true from the docs deploy. Without it, mkdocs
  generated output replaces the gh-pages tree cleanly so removed
  pages don't linger.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Coverage upload to Scrutinizer was removed alongside the Travis
migration (no equivalent step in the new GitHub Actions workflow),
so both Scrutinizer badges will go stale. Drop them. Re-add a
coverage badge once we pick a successor (Codecov, Coveralls, etc.).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rick-lam rick-lam merged commit 501a7f5 into main May 7, 2026
12 checks passed
@rick-lam rick-lam deleted the chore/migrate-ci-to-github-actions branch May 7, 2026 10:14
@biggianteye
Copy link
Copy Markdown
Collaborator

I'm glad to finally see travis being dropped and a return to a working build pipeline. 🎉

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.

3 participants