-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rails 7 support and migrating away from Travis (#61)
* Update maintenance policy and dummy gemfiles * Update check changelog * First Github CI commit * Fix missing net/smtp error ``` Error: LayoutsTest#test_no_layout: LoadError: cannot load such file -- net/smtp activesupport (6.1.6) lib/active_support/dependencies.rb:332:in `require' activesupport (6.1.6) lib/active_support/dependencies.rb:332:in `block in require' activesupport (6.1.6) lib/active_support/dependencies.rb:299:in `load_dependency' activesupport (6.1.6) lib/active_support/dependencies.rb:332:in `require' mail (2.7.1) lib/mail.rb:9:in `<module:Mail>' ``` https://stackoverflow.com/questions/70500220/rails-7-ruby-3-1-loaderror-cannot-load-such-file-net-smtp * Patch for Rails 7 Documented in #59. This class was removed from Rails 7. This causes an error on this line when trying to alias a method that does not exist https://github.com/zombocom/maildown/blob/cbf5b51e0867eab1ec945d38b5335f42139b0322/lib/maildown/ext/action_view.rb#L7. The solution presented was to re-add the method. However simply doing this with a `defined?(OptimizedFileSystemResolver)` causes a load via zeitwork and also results in a crash. The presence of this code appears to do nothing in Rails 7. It's basically a no-op that allows us to boot without erroring.
- Loading branch information
Showing
21 changed files
with
812 additions
and
612 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
name: Check Changelog | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, edited, synchronize] | ||
pull_request: | ||
types: [opened, reopened, edited, labeled, unlabeled, synchronize] | ||
|
||
jobs: | ||
build: | ||
check-changelog: | ||
runs-on: ubuntu-latest | ||
if: | | ||
!contains(github.event.pull_request.body, '[skip changelog]') && | ||
!contains(github.event.pull_request.body, '[changelog skip]') && | ||
!contains(github.event.pull_request.body, '[skip ci]') && | ||
!contains(github.event.pull_request.labels.*.name, 'skip changelog') && | ||
!contains(github.event.pull_request.labels.*.name, 'dependencies') && | ||
!contains(github.event.pull_request.labels.*.name, 'automation') | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Check that CHANGELOG is touched | ||
run: | | ||
cat $GITHUB_EVENT_PATH | jq .pull_request.title | grep -i '\[\(\(changelog skip\)\|\(ci skip\)\)\]' || git diff remotes/origin/${{ github.base_ref }} --name-only | grep CHANGELOG.md | ||
- uses: actions/checkout@v3 | ||
- name: Check that CHANGELOG is touched | ||
run: | | ||
git fetch origin ${{ github.base_ref }} --depth 1 && \ | ||
git diff remotes/origin/${{ github.base_ref }} --name-only | grep CHANGELOG.md |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CI | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: | ||
- '2.7' | ||
- '3.0' | ||
- '3.1' | ||
# - 'head' | ||
gemfile: | ||
- gemfiles/rails_6_0.gemfile | ||
- gemfiles/rails_6_1.gemfile | ||
- gemfiles/rails_7_0.gemfile | ||
# - gemfile: gemfiles/rails_head.gemfile | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
env: | ||
BUNDLE_GEMFILE: ${{ matrix.gemfile }} | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Run test | ||
env: | ||
BUNDLE_GEMFILE: ${{ matrix.gemfile }} | ||
run: bundle exec rake test |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
appraise "rails-5" do | ||
gem "rails", "5.0.7.2" | ||
gem "sqlite3", "~> 1.3.6" | ||
appraise "rails_5_2" do | ||
gem "rails", "5.2.3" | ||
gem "sqlite3", "~> 1.4" | ||
gem 'net-smtp', require: false | ||
end | ||
|
||
appraise "rails-51" do | ||
gem "rails", "5.1.7" | ||
gem "sqlite3", "~> 1.3.6" | ||
appraise "rails_6_0" do | ||
gem "rails", "6.0.5" | ||
gem "sqlite3", "~> 1.4" | ||
gem 'net-smtp', require: false | ||
end | ||
|
||
appraise "rails-52" do | ||
gem "rails", "5.2.3" | ||
gem "sqlite3", "~> 1.3.6" | ||
appraise "rails_6_1" do | ||
gem "rails", "6.1.6" | ||
gem "sqlite3", "~> 1.4" | ||
gem 'net-smtp', require: false | ||
end | ||
|
||
appraise "rails-6" do | ||
gem "rails", "6.0.0" | ||
appraise "rails_7_0" do | ||
gem "rails", "7.0.3" | ||
gem "sqlite3", "~> 1.4" | ||
end | ||
|
||
appraise "rails-head" do | ||
appraise "rails_head" do | ||
gem "rails", git: "https://github.com/rails/rails.git" | ||
gem "railties", git: "https://github.com/rails/rails.git" | ||
gem "sqlite3", "~> 1.4" | ||
end |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.