Skip to content

Commit

Permalink
when ruby test passes run all combinations of ruby/faraday/active[sup…
Browse files Browse the repository at this point in the history
…port|model]

- ruby: 2.6, 2.7, 3.0, 3.1, 3.2
- faraday: 1.x, 2.x
- activesupport/active_model: 6.0, 6.1, 7.0, 7.1
- exclude ruby 2.6 / [activesupport >= 7.0](https://rubygems.org/gems/activesupport/versions/7.0.8)
  b/c required ruby >= 2.7.0
  • Loading branch information
LeipeLeon committed Dec 9, 2023
1 parent 69f836c commit 0626a36
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,62 @@ jobs:
bundle install --jobs 4
- name: Run tests
run: bundle exec rake

test_active_support:
needs: test_ruby_version
runs-on: ubuntu-latest
name: ruby-${{ matrix.ruby }}, ${{ matrix.gemfile }}, ${{ matrix.faraday }}
strategy:
fail-fast: false
# https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
matrix:
ruby:
- "2.6"
- "2.7"
- "3.0"
- "3.1"
- "3.2"
faraday:
- "faraday_1.x"
- "faraday_2.x"
gemfile:
- "activesupport_6.0"
- "activesupport_6.1"
- "activesupport_7.0"
- "activesupport_7.1"
exclude:
- ruby: "2.6"
gemfile: "activesupport_7.0"
- ruby: "2.6"
gemfile: "activesupport_7.1"

env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}_${{ matrix.faraday }}.gemfile
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Configure bundler
run: |
bundle config path vendor/bundle
- name: Create bundler lockfile
run: |
bundle lock
- uses: actions/cache@v3
with:
# NOTE: Bundler expands the path relative to the gemfile, not the
# current directory.
path: ./gemfiles/vendor/bundle
key: bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ matrix.faraday }}-${{ hashFiles( 'gemfiles/*.lock' ) }}
restore-keys: |
bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ matrix.faraday }}
bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-
bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-
- name: Install gems
run: |
bundle install --jobs 4
- name: Run tests
run: bundle exec rake

0 comments on commit 0626a36

Please sign in to comment.