Skip to content

Commit

Permalink
Test Rails 6.0, Rails edge + Ruby 3.0 in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianna-chang-shopify authored and etiennebarrie committed Mar 31, 2021
1 parent 68026a3 commit f8e4162
Show file tree
Hide file tree
Showing 9 changed files with 474 additions and 8 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ jobs:
build:

runs-on: ubuntu-latest

name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
gemfile: [Gemfile, gemfiles/rails_6_0.gemfile, gemfiles/rails_edge.gemfile]
ruby: [2.7, 3.0]
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Ruby
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Set up database
run: RAILS_ENV=test bundle exec rails db:setup
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem "capybara"
gem "mocha"
gem "pry-byebug"
gem "puma"
gem "rails"
gem "rails", $rails_gem_requirement
gem "rubocop-shopify"
gem "selenium-webdriver"
gem "sqlite3"
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@ pull requests. You can find the contribution guidelines on

[contributing]: https://github.com/Shopify/maintenance_tasks/blob/main/.github/CONTRIBUTING.md

### Dependabot updates

Whenever Dependabot creates a PR for a gem bump, check out the branch locally
and run `bin/update-gemfile <gem>` to ensure all the gemfiles have the gem
updated consistently.

## Releasing new versions

Updates should be added to the latest draft release on GitHub as Pull Requests
Expand All @@ -432,14 +438,14 @@ are merged.
Once a release is ready, follow these steps:

* Update `spec.version` in `maintenance_tasks.gemspec`.
* Run `bundle install` to bump the `Gemfile.lock` version of the gem.
* Run `bin/gemfile-update install` to bump the version in all the lockfiles.
* Open a PR and merge on approval.
* Deploy via [Shipit][shipit] and see the new version on
<https://rubygems.org/gems/maintenance_tasks>.
* Ensure the release has documented all changes and publish it.
* Create a new [draft release on GitHub][release] with the title
'Upcoming Release'. The tag version can be left blank. This will be the
starting point for documenting changes related to the next release.
* Create a new [draft release on GitHub][release] with the title 'Upcoming
Release'. The tag version can be left blank. This will be the starting point
for documenting changes related to the next release.

[release]: https://help.github.com/articles/creating-releases/
[shipit]: https://shipit.shopify.io/shopify/maintenance_tasks/rubygems
11 changes: 11 additions & 0 deletions bin/gemfile-update
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -ex

for gemfile in Gemfile gemfiles/*.gemfile; do
if [ install = "$1" ]; then
BUNDLE_GEMFILE="$gemfile" bundle install
else
BUNDLE_GEMFILE="$gemfile" bundle update "${1:?provide a gem to update}"
fi
done
5 changes: 5 additions & 0 deletions gemfiles/rails_6_0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

$rails_gem_requirement = "~> 6.0.0"

eval_gemfile "../Gemfile"
212 changes: 212 additions & 0 deletions gemfiles/rails_6_0.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
PATH
remote: ..
specs:
maintenance_tasks (1.2.1)
actionpack (>= 6.0)
activejob (>= 6.0)
activerecord (>= 6.0)
job-iteration (~> 1.1)
railties (>= 6.0)

GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.3.6)
actionpack (= 6.0.3.6)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.3.6)
actionpack (= 6.0.3.6)
activejob (= 6.0.3.6)
activerecord (= 6.0.3.6)
activestorage (= 6.0.3.6)
activesupport (= 6.0.3.6)
mail (>= 2.7.1)
actionmailer (6.0.3.6)
actionpack (= 6.0.3.6)
actionview (= 6.0.3.6)
activejob (= 6.0.3.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.3.6)
actionview (= 6.0.3.6)
activesupport (= 6.0.3.6)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.3.6)
actionpack (= 6.0.3.6)
activerecord (= 6.0.3.6)
activestorage (= 6.0.3.6)
activesupport (= 6.0.3.6)
nokogiri (>= 1.8.5)
actionview (6.0.3.6)
activesupport (= 6.0.3.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.3.6)
activesupport (= 6.0.3.6)
globalid (>= 0.3.6)
activemodel (6.0.3.6)
activesupport (= 6.0.3.6)
activerecord (6.0.3.6)
activemodel (= 6.0.3.6)
activesupport (= 6.0.3.6)
activestorage (6.0.3.6)
actionpack (= 6.0.3.6)
activejob (= 6.0.3.6)
activerecord (= 6.0.3.6)
marcel (~> 1.0.0)
activesupport (6.0.3.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.2)
builder (3.2.4)
byebug (11.1.3)
capybara (3.35.3)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
childprocess (3.0.0)
coderay (1.1.3)
concurrent-ruby (1.1.8)
crass (1.0.6)
erubi (1.10.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (1.8.9)
concurrent-ruby (~> 1.0)
job-iteration (1.1.9)
activejob (>= 5.2)
loofah (2.9.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.0)
method_source (1.0.0)
mini_mime (1.0.3)
minitest (5.14.4)
mocha (1.12.0)
nio4r (2.5.7)
nokogiri (1.11.2-x86_64-darwin)
racc (~> 1.4)
parallel (1.20.1)
parser (3.0.0.0)
ast (~> 2.4.1)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.13.0)
public_suffix (4.0.6)
puma (5.2.2)
nio4r (~> 2.0)
racc (1.5.2)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.3.6)
actioncable (= 6.0.3.6)
actionmailbox (= 6.0.3.6)
actionmailer (= 6.0.3.6)
actionpack (= 6.0.3.6)
actiontext (= 6.0.3.6)
actionview (= 6.0.3.6)
activejob (= 6.0.3.6)
activemodel (= 6.0.3.6)
activerecord (= 6.0.3.6)
activestorage (= 6.0.3.6)
activesupport (= 6.0.3.6)
bundler (>= 1.3.0)
railties (= 6.0.3.6)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (6.0.3.6)
actionpack (= 6.0.3.6)
activesupport (= 6.0.3.6)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rainbow (3.0.0)
rake (13.0.3)
regexp_parser (2.1.1)
rexml (3.2.4)
rubocop (1.12.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.2.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.4.1)
parser (>= 2.7.1.5)
rubocop-shopify (2.0.1)
rubocop (~> 1.11)
ruby-progressbar (1.11.0)
rubyzip (2.3.0)
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
thor (1.1.0)
thread_safe (0.3.6)
tzinfo (1.2.9)
thread_safe (~> 0.1)
unicode-display_width (2.0.0)
webdrivers (4.6.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.26)
zeitwerk (2.4.2)

PLATFORMS
x86_64-darwin-19

DEPENDENCIES
capybara
maintenance_tasks!
mocha
pry-byebug
puma
rails (~> 6.0.0)
rubocop-shopify
selenium-webdriver
sqlite3
webdrivers
yard

BUNDLED WITH
2.2.5
5 changes: 5 additions & 0 deletions gemfiles/rails_edge.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

$rails_gem_requirement = { github: "rails/rails" }

eval_gemfile "../Gemfile"
Loading

0 comments on commit f8e4162

Please sign in to comment.