Skip to content

Migrate CI from Travis to GitHub Actions - #429

Merged
joeycozza merged 4 commits into
frontierMasterfrom
migrate-travis-to-github-actions
Aug 27, 2026
Merged

Migrate CI from Travis to GitHub Actions#429
joeycozza merged 4 commits into
frontierMasterfrom
migrate-travis-to-github-actions

Conversation

@joeycozza

Copy link
Copy Markdown

Replaces .travis.yml with .github/workflows/ci.yml. All three things Travis did are preserved: publish a CI prerelease of @fs/react-scripts on every run, smoke-test it by scaffolding a real app against that exact prerelease, and publish the committed version on frontierMaster / v7.x / next.

Three things worth a look:

  • No hand-written .npmrc. Auth comes from actions/setup-node's registry-url, matching how zion does it. scope: '@fs' is deliberately omitted — with a scope only @fs packages route through Artifactory, without one setup-node writes a bare registry= line and everything does, as on Travis. That keeps jfrog curation in play, which the E403 diagnostic in publishPrReleaseAndCreateFreshCraTemplate.js depends on.
  • Prereleases relabeled X.Y.Z-prerelease.<run-number>. GITHUB_RUN_NUMBER restarts at 1, but semver compares prerelease identifiers in ASCII order and 'T'(84) < 'p'(112), so 8.17.0-prerelease.1 still sorts above 8.17.0-TravisPrerelease.2311 — the next dist-tag won't move backwards.
  • Version bumped to 8.16.3. frontierInit.js ships in the package; at 8.16.2 npmPublish would no-op and the change would never reach consumers.

Also deletes upstream Facebook CI config dead since the fork (azure-pipelines*, integration.yml, the Azure badge) — all keyed to a main branch we don't have.

Before merging, out-of-repo:

  1. Add the NPM_PUBLISH_TOKEN repo secret (copy from Travis; must be publish-capable, not the read-only org NPM_TOKEN). The CI check on this PR will fail until this exists.
  2. Swap the required check on frontierMaster from Travis CI - Pull Request to build-and-publish.
  3. Disable Travis once a run goes green, so both don't publish.

Note: push is scoped to the three release branches, so a branch with no open PR no longer gets a prerelease. If anyone relies on that, branches-ignore: [master] restores it — at the cost of duplicate same-named check runs on every PR.

🤖 Generated with Claude Code

Replaces .travis.yml with .github/workflows/ci.yml, preserving all three
things the Travis pipeline did: publish a CI prerelease of
@fs/react-scripts on every run, smoke-test that prerelease by scaffolding
a real app against it, and publish the committed version on
frontierMaster / v7.x / next.

Artifactory auth now comes from actions/setup-node's registry-url instead
of three hand-written .npmrc files. `scope` is deliberately omitted so
setup-node writes a bare `registry=` line and all traffic keeps resolving
through the jfrog virtual registry, preserving curation enforcement.

CI prereleases are relabeled X.Y.Z-prerelease.<run-number>. GITHUB_RUN_NUMBER
restarts at 1, but semver compares alphanumeric prerelease identifiers in
ASCII order and 'T' (84) < 'p' (112), so 8.17.0-prerelease.1 still sorts
above 8.17.0-TravisPrerelease.2311 and the `next` dist-tag does not move
backwards.

Bumps @fs/react-scripts to 8.16.3 so the frontierInit.js change actually
ships; at 8.16.2 npmPublish would no-op.

Also drops upstream Facebook CI config dead since the fork: azure-pipelines*,
.github/workflows/integration.yml, and the Azure badge in README.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread .github/workflows/ci.yml Fixed
joeycozza and others added 3 commits August 27, 2026 11:04
create-react-app's init.js git-inits the app it scaffolds and then commits
it. On a GitHub Actions runner there is no git identity, so the commit
failed with status 128 and init.js deleted the .git directory it had just
created -- a stack trace in the log for no result.

The app scaffolded in CI is a throwaway smoke test that nothing commits or
pushes, so skip the git work entirely there. Gated on a new isFrontierCi()
helper in frontierInit.js, which also de-duplicates the
GITHUB_REPOSITORY check that setupFrontier already made.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This repo's default_workflow_permissions is "write", so without an
explicit block every job gets a read/write GITHUB_TOKEN. Nothing in this
workflow touches the GitHub API: checkout only reads, and both the
prerelease and release publishes authenticate to Artifactory with
NODE_AUTH_TOKEN. Leaving a write-scoped token in the environment while
`npm install` runs lifecycle scripts across the full dependency tree of a
public repo is avoidable exposure.

Matches merge-lingoport-translations.yml, which already declares its
permissions explicitly.

Flagged by CodeQL on #429.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@joeycozza
joeycozza merged commit db0e7d5 into frontierMaster Aug 27, 2026
4 checks passed
@joeycozza
joeycozza deleted the migrate-travis-to-github-actions branch August 27, 2026 20:33
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