[OMBU-821] Run CI as a dual-boot matrix and bump Postgres to 18.3 - #21
Merged
Conversation
The two nearly identical jobs differed only in BUNDLE_GEMFILE, so collapse them into one matrix over [Gemfile, Gemfile.next] with fail-fast disabled, matching skunk.fyi's workflow. Postgres goes from 11.6 to 18.3 to match production, which was upgraded from 15.17 to 18.3 today. Other changes that come with following skunk.fyi: - checkout@v1 -> checkout@v4 - ruby-version: "4.0.6" -> ruby-version-file: .tool-versions, so the version lives in one place - bundler-cache: true instead of hand-rolled `gem install bundler` + `bundle install`. It resolves against BUNDLE_GEMFILE and caches each boot separately. The next job's `bundle update rails` is dropped: both lockfiles are committed and satisfied, so there is nothing to resolve at CI time - drop `bin/setup`, which re-runs bundler, db:prepare, log:clear and restart on top of the db:setup that follows it - drop `cat config/database.yml`, a debugging leftover - hoist the shared env block to job level - add timeout-minutes: 20 No Lint step, unlike skunk.fyi: rubocop is in neither lockfile here. Also ignore .worktrees/, used for local git worktrees.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The two CI jobs,
test-rails-currentandtest-rails-next, were near-duplicatesthat differed only in
BUNDLE_GEMFILE. Every change had to be made twice.Postgres in CI was also pinned to
11.6-alpine, seven majors behind production.Production was upgraded from 15.17 to 18.3 today, so CI now matches it.
What changed
testjob withmatrix: [Gemfile, Gemfile.next]andfail-fast: false,so a failure in one boot still reports the other. Follows
skunk.fyi's workflow.
11.6-alpine->18.3-alpine, matching production.actions/checkout@v1->@v4.ruby-version: "4.0.6"->ruby-version-file: .tool-versions, so the Rubyversion lives in one place.
bundler-cache: truereplaces the hand-rolledgem install bundler+bundle install. It resolves againstBUNDLE_GEMFILEand caches each bootseparately.
bundle update railsfrom the next-boot job. Both lockfiles arecommitted and
bundle checkpasses against each, so there is nothing toresolve at CI time.
bin/setup, which re-ran bundler,db:prepare,log:clearandrestartimmediately before thedb:setupthat followed it.cat config/database.yml, a debugging leftover.envblock to job level and addedtimeout-minutes: 20.