feat: Update workflows to use gem caching and latest Ruby 2.7. #851
Conversation
| with: | ||
| ruby-version: 2.6.x | ||
| ruby-version: 2.6 |
nschonni
Nov 19, 2020
Contributor
Looks like these can be dropped now and it will read the .ruby-version https://github.com/ruby/setup-ruby#supported-version-syntax
elstudio
Nov 19, 2020
Author
Collaborator
True. However, in .ruby-version we must specify the full 2.6.6 version — since rbenv requires a full version (it can’t work with 2.6).
I think it’s better to leave the major version in our workflows, which will automatically use the latest 2.6 patch.
Folks building locally with rbenv will still use the .ruby-version — and so I’ve matched that for now.
Downside of that approach is that it repeats ourselves, kinda. But I think it’s better to automatically get patch releases in our workflows. What do you think?
nschonni
Nov 19, 2020
Contributor
Fair enough. I think 2.7.1 is the latest for the pages setup though. I usually peak over at https://github.com/github/pages-gem/ when I'm looking to bump that
elstudio
Nov 19, 2020
Author
Collaborator
Yeah. And 2.7 will run a little faster. Tests do pass running locally with 2.7, so that looks okay.
Thinking about this a little more, since we have multiple workflows here, why don’t we leave the ruby version specification to .ruby-version. That way we have just one file to keep up to date, rather than 4 workflows, too.
So I’ll push that commit in a second here. You okay with that approach?
nschonni
Nov 19, 2020
Contributor
Yup, that works for me. I think I came across somewhere that had an automated way to pull down the info from an API to keep it in sync, but I don't recall were now
| gem install bundler | ||
| bundle install --jobs 4 --retry 3 | ||
| bundle exec rubocop -D -S | ||
| run: bundle exec rubocop -D -S -a |
nschonni
Nov 19, 2020
Contributor
I don't think autocorrect makes sense for the CI. The CI will pass, even if there are issues in the checked in code as long as they are fixable
elstudio
Nov 19, 2020
Author
Collaborator
Good side about my making dumb mistakes like this — gem caching really works!
nschonni
Nov 19, 2020
Contributor
I hadn't seen that option before, so now I'm going to go update a few workflows for that cache seeing
Also remove ruby version here.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Update workflows to use gem caching, by using the more full-featured ruby/setup-ruby action.
This action combines the functionality of both actions/setup-ruby and actions/cache — and makes it a bit easier to specify ruby versions, too.
Now specifying the ruby version in our .ruby-version file: Updated to 2.7.2.
Fixes #750.