chore(ci): Migrate from Travis to GH actions#367
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the project’s CI pipeline from Travis CI to GitHub Actions, updating release/token handling and documentation accordingly.
Changes:
- Remove legacy Travis CI configuration.
- Add GitHub Actions workflow to run the Ruby test matrix and perform releases on
master. - Update release wrapper and CI documentation to use GitHub Actions environment variables and releasebot + RubyGems trusted publishing.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
release.sh |
Switches repo detection from TRAVIS_REPO_SLUG to GITHUB_REPOSITORY for semantic-release. |
README_CI.md |
Documents new release credentials flow (GitHub App token + RubyGems OIDC) and updates env var name. |
README.md |
Replaces Travis build badge with GitHub Actions badge. |
.travis.yml |
Removes Travis CI configuration. |
.github/workflows/ci.yml |
Introduces GitHub Actions workflow for tests + release job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| env: | ||
| PGPORT: 5432 | ||
| PGUSER: travis |
There was a problem hiding this comment.
The Rails fixture apps' config/database.yml doesn't specify a host, so libpq will default to a local Unix socket when DATABASE_URL is unset. In GitHub Actions the Postgres service runs in a container, so connections must go over TCP; please set PGHOST=localhost (or set DATABASE_URL to include localhost and the mapped port) so tests can actually reach the service container.
| PGUSER: travis | |
| PGUSER: travis | |
| PGHOST: localhost |
| if [ ! -z "$GITHUB_REPOSITORY" ]; then | ||
| RELEASE_FLAGS="-r git+https://github.com/${GITHUB_REPOSITORY}.git" | ||
| fi | ||
|
|
||
| if [ ! -z "$GEM_ALTERNATIVE_NAME" ]; then |
There was a problem hiding this comment.
Consider using a more robust/idiomatic env var check here, e.g. -n "${GITHUB_REPOSITORY:-}", to avoid edge cases with unset variables and to satisfy common shell linters (ShellCheck warns about ! -z).
| if [ ! -z "$GITHUB_REPOSITORY" ]; then | |
| RELEASE_FLAGS="-r git+https://github.com/${GITHUB_REPOSITORY}.git" | |
| fi | |
| if [ ! -z "$GEM_ALTERNATIVE_NAME" ]; then | |
| if [ -n "${GITHUB_REPOSITORY:-}" ]; then | |
| RELEASE_FLAGS="-r git+https://github.com/${GITHUB_REPOSITORY}.git" | |
| fi | |
| if [ -n "${GEM_ALTERNATIVE_NAME:-}" ]; then |
| variable if its defined (otherwise git url is taken from `package.json`, | ||
| Bash wrapper script is used merely as a launcher of `semantic-release` | ||
| with extra logic to explicitly determine git url from `GITHUB_REPOSITORY` \ | ||
| variable if its defined (otherwise git url is taken from `package.json`, |
There was a problem hiding this comment.
Grammar: its should be it's in "variable if its defined".
| variable if its defined (otherwise git url is taken from `package.json`, | |
| variable if it’s defined (otherwise git url is taken from `package.json`, |
e909040 to
1301566
Compare
Newer concurrent-ruby causes error: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger
- Add mutex_m as an explicit dependency; - modify expected sequel to match what AR now generates.
Travis hasn't worked for a while. This pull request migrates CI to GitHub actions.
For release it uses releasebot app to obtain GH token for release and commit, and uses trusted publishing for rubygems.