Skip to content

Commit

Permalink
Cleanup test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuravel committed Aug 10, 2024
1 parent fc2fc9d commit dbcec12
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

# The test job is a matrix of ruby/rails versions.
gha-job-authlogic-test:
name: Ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}.rb
name: Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}
runs-on: ubuntu-latest
services:
gha-service-authlogic-mysql:
Expand Down Expand Up @@ -56,24 +56,21 @@ jobs:
# have set this up with each database as a separate job, but then we'd be
# duplicating the matrix configuration three times.
matrix:
gemfile:
["rails_5.2", "rails_6.0", "rails_6.1", "rails_7.0", "rails_7.1", "rails_7.2"]

# To keep matrix size down, only test highest and lowest rubies. In
# `.rubocop.yml`, set `TargetRubyVersion`, to the lowest ruby version
# tested here.
ruby: ["2.6", "3.3"]

rails: ["5.2", "6.0", "6.1", "7.0", "7.1", "7.2"]
exclude:
# rails 7 requires ruby >= 2.7.0
- ruby: "2.6"
gemfile: "rails_7.0"
rails: "7.0"
- ruby: "2.6"
gemfile: "rails_7.1"
rails: "7.1"
- ruby: "2.6"
gemfile: "rails_7.2"
rails: "7.2"
- ruby: "3.3"
gemfile: "rails_5.2"
rails: "5.2"
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand All @@ -86,7 +83,7 @@ jobs:
gem install bundler -v 2.4.22
bundle install --jobs 4 --retry 3
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.rb
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.rb

# MySQL db was created above, sqlite will be created during test suite,
# when migrations occur, so we only need to create the postgres db. I
Expand All @@ -110,13 +107,13 @@ jobs:
- name: Test, sqlite
run: bundle exec rake test
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.rb
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.rb
DB: sqlite
- name: Test, mysql
run: bundle exec rake test
env:
BACKTRACE: 1
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.rb
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.rb
DB: mysql
AUTHLOGIC_DB_NAME: authlogic
AUTHLOGIC_DB_USER: root
Expand All @@ -126,7 +123,7 @@ jobs:
run: bundle exec rake test
env:
BACKTRACE: 1
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.rb
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.rb
DB: postgres
AUTHLOGIC_DB_NAME: authlogic
AUTHLOGIC_DB_USER: postgres
Expand Down

0 comments on commit dbcec12

Please sign in to comment.