Skip to content

Commit

Permalink
Improve CI
Browse files Browse the repository at this point in the history
- Test against latest stable Ruby versions
- Test against AR 7.1
- Do not test incompatible Ruby / AR versions (like 3.0 against 5.0)
- Use `include` syntax for legacy AR versions
- Mark `edge` tests as `experimental` to allow failures
- Update checkout actions
  • Loading branch information
tagliala committed Aug 26, 2024
1 parent 06a42e3 commit 9ad2819
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 14 deletions.
49 changes: 41 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,54 @@ jobs:
strategy:
matrix:
ruby:
- head
- "3.3"
- "3.2"
- "3.1"
- "3.0"
- "2.7"
gemfile:
- gemfiles/ar50.gemfile
- gemfiles/ar51.gemfile
- gemfiles/ar52.gemfile
- gemfiles/ar60.gemfile
- gemfiles/ar61.gemfile
- gemfiles/ar70.gemfile
- gemfiles/ar71.gemfile
- gemfiles/rgeo1.gemfile
- gemfiles/rgeo3.gemfile
channel: ['stable']
include:
# Test legacy AR 5.x/6.x series
- ruby: '2.7'
gemfile: gemfiles/ar50.gemfile
channel: 'stable'
- ruby: '2.7'
gemfile: gemfiles/ar51.gemfile
channel: 'stable'
- ruby: '2.7'
gemfile: gemfiles/ar52.gemfile
channel: 'stable'
- ruby: '2.7'
gemfile: gemfiles/ar60.gemfile
channel: 'stable'
- ruby: '2.7'
gemfile: gemfiles/ar61.gemfile
channel: 'stable'
- ruby: '3.0'
gemfile: gemfiles/ar60.gemfile
channel: 'stable'
- ruby: '3.0'
gemfile: gemfiles/ar61.gemfile
channel: 'stable'
- ruby: '3.1'
gemfile: gemfiles/ar61.gemfile
channel: 'stable'
# Test against Ruby head
- ruby: head
gemfile: gemfiles/ar71.gemfile
channel: 'experimental'
- ruby: head
gemfile: gemfiles/rgeo3.gemfile
channel: 'experimental'
continue-on-error: ${{ matrix.channel != 'stable' }}
steps:
- name: Set Up Gems
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set Up Deps
run: sudo apt-get install libgeos-dev
- name: Set Up Ruby
Expand Down Expand Up @@ -51,7 +84,7 @@ jobs:
- gemfiles/rgeo1.gemfile
steps:
- name: Set Up Gems
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set Up Deps
run: sudo apt-get install libgeos-dev
- name: Set Up Ruby
Expand Down
10 changes: 7 additions & 3 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ appraise "ar52" do
end

appraise "ar60" do
gem "activerecord", "~> 6.0.0.rc1"
gem "activerecord", "~> 6.0.0"
end

appraise "ar61" do
Expand All @@ -22,9 +22,13 @@ appraise "ar70" do
gem "activerecord", "~> 7.0.0"
end

appraise "ar71" do
gem "activerecord", "~> 7.1.0"
end

appraise "rgeo3" do
gem "activerecord", "~> 7.0.0"
gem "rgeo", "~> 3.0.0"
gem "activerecord", "~> 7.1.0"
gem "rgeo", "~> 3.0"
end

appraise "rgeo1" do
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/ar60.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

source "https://rubygems.org"

gem "activerecord", "~> 6.0.0.rc1"
gem "activerecord", "~> 6.0.0"

gemspec path: "../"
7 changes: 7 additions & 0 deletions gemfiles/ar71.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activerecord", "~> 7.1.0"

gemspec path: "../"
4 changes: 2 additions & 2 deletions gemfiles/rgeo3.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "activerecord", "~> 7.0.0"
gem "rgeo", "~> 3.0.0"
gem "activerecord", "~> 7.1.0"
gem "rgeo", "~> 3.0"

gemspec path: "../"

0 comments on commit 9ad2819

Please sign in to comment.