Skip to content

Commit

Permalink
Update CI test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
allmarkedup committed Oct 9, 2024
1 parent d35a96c commit 4c30808
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 26 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,32 @@ on:

jobs:
test:
name: test (${{ matrix.rails_version }}, ${{ matrix.ruby_version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [3.0, 3.1, 3.2]
appraisal: ["rails-6.0", "rails-6.1", "rails-7.0", "rails-head"]
include:
- ruby_version: "3.0"
rails_version: "6.1"
- ruby_version: "3.1"
rails_version: "7.0"
- ruby_version: "3.2"
rails_version: "7.1"
- ruby_version: "3.3"
rails_version: "7.2"
- ruby_version: "3.3"
rails_version: "rails-head"
env:
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails_version }}.gemfile
steps:
- uses: actions/checkout@v3

- name: Set up Ruby ${{ matrix.ruby }}
- name: Set up Ruby ${{ matrix.ruby_version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: false
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true

- name: Set system gem command
run: gem update --system
Expand All @@ -32,8 +44,10 @@ jobs:
- name: Bundle for Appraisal
run: bundle

- name: Install Appraisal dependencies
run: bundle exec appraisal ${{ matrix.appraisal }} bundle

- name: Run tests
run: bundle exec appraisal ${{ matrix.appraisal }} rspec
- name: Build and test
run: |
bundle exec appraisal rails-${{ matrix.rails_version }} bundle
bundle exec appraisal rails-${{ matrix.rails_version }} rspec
env:
RAILS_VERSION: ${{ matrix.rails_version }}
RUBY_VERSION: ${{ matrix.ruby_version }}
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem "view_component"
gem "yard-activesupport-concern"

group :test do
gem "appraisal", github: "thoughtbot/appraisal", branch: "main"
gem "appraisal"
gem "phlex-rails", require: false
gem "factory_bot", require: false
gem "capybara", "~> 3.39"
Expand Down
16 changes: 5 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
GIT
remote: https://github.com/thoughtbot/appraisal.git
revision: feb78bcc6177038399bff098cb6c2bd4bca4972a
branch: main
specs:
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)

PATH
remote: .
specs:
Expand Down Expand Up @@ -94,6 +84,10 @@ GEM
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)
ast (2.4.2)
base64 (0.2.0)
builder (3.2.4)
Expand Down Expand Up @@ -272,7 +266,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
appraisal!
appraisal
capybara (~> 3.39)
combustion (~> 1.3)
factory_bot
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem "yard-activesupport-concern"
gem "rspec-rails", "~> 5"

group :test do
gem "appraisal", github: "thoughtbot/appraisal", branch: "main"
gem "appraisal"
gem "phlex-rails", require: false
gem "factory_bot", require: false
gem "capybara", "~> 3.39"
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ gem "net-imap", require: false
gem "net-pop", require: false

group :test do
gem "appraisal", github: "thoughtbot/appraisal", branch: "main"
gem "appraisal"
gem "phlex-rails", require: false
gem "factory_bot", require: false
gem "capybara", "~> 3.39"
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem "yard-activesupport-concern"
gem "rspec-rails", "~> 6"

group :test do
gem "appraisal", github: "thoughtbot/appraisal", branch: "main"
gem "appraisal"
gem "phlex-rails", require: false
gem "factory_bot", require: false
gem "capybara", "~> 3.39"
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_head.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem "yard-activesupport-concern"
gem "rspec-rails", "~> 6"

group :test do
gem "appraisal", github: "thoughtbot/appraisal", branch: "main"
gem "appraisal"
gem "phlex-rails", require: false
gem "factory_bot", require: false
gem "capybara", "~> 3.39"
Expand Down

0 comments on commit 4c30808

Please sign in to comment.