Skip to content

Commit cfe2c46

Browse files
committed
add: test each combination of ruby/faraday/rails
1 parent 5c93cd0 commit cfe2c46

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/workflows/ruby.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,66 @@ jobs:
6161
bundle install --jobs 4
6262
- name: Run tests
6363
run: bundle exec rake
64+
65+
test_active_support:
66+
needs: test_ruby_version
67+
runs-on: ubuntu-latest
68+
name: ruby-${{ matrix.ruby }}, ${{ matrix.gemfile }}, ${{ matrix.faraday }}
69+
strategy:
70+
fail-fast: false
71+
# https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
72+
matrix:
73+
ruby:
74+
- "3.0"
75+
- "3.1"
76+
- "3.2"
77+
- "3.3"
78+
- "3.4"
79+
faraday:
80+
- "faraday_1.x"
81+
- "faraday_2.x"
82+
gemfile:
83+
- "activesupport_6.0"
84+
- "activesupport_6.1"
85+
- "activesupport_7.0"
86+
- "activesupport_7.1"
87+
- "activesupport_7.2"
88+
- "activesupport_8.0"
89+
exclude:
90+
- ruby: "3.0"
91+
gemfile: "activesupport_7.2"
92+
- ruby: "3.0"
93+
gemfile: "activesupport_8.0"
94+
- ruby: "3.1"
95+
gemfile: "activesupport_8.0"
96+
97+
env:
98+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}_${{ matrix.faraday }}.gemfile
99+
steps:
100+
- uses: actions/checkout@v4
101+
- name: Set up Ruby
102+
uses: ruby/setup-ruby@v1
103+
with:
104+
ruby-version: ${{ matrix.ruby }}
105+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
106+
- name: Configure bundler
107+
run: |
108+
bundle config path vendor/bundle
109+
- name: Create bundler lockfile
110+
run: |
111+
bundle lock
112+
- uses: actions/cache@v3
113+
with:
114+
# NOTE: Bundler expands the path relative to the gemfile, not the
115+
# current directory.
116+
path: ./gemfiles/vendor/bundle
117+
key: bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ matrix.faraday }}-${{ hashFiles( 'gemfiles/*.lock' ) }}
118+
restore-keys: |
119+
bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ matrix.faraday }}
120+
bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-
121+
bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-
122+
- name: Install gems
123+
run: |
124+
bundle install --jobs 4
125+
- name: Run tests
126+
run: bundle exec rake

0 commit comments

Comments
 (0)