Skip to content

Commit dd63b5f

Browse files
committed
collapse test jobs into a matrix configuration
1 parent 20decc7 commit dd63b5f

File tree

1 file changed

+10
-62
lines changed

1 file changed

+10
-62
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -5,76 +5,24 @@ on:
55
branches: [ '*' ]
66

77
jobs:
8-
test_rails_52:
9-
runs-on: ubuntu-latest
10-
strategy:
11-
matrix:
12-
ruby-version: ['2.2.10', '2.5.8', 'jruby-9.2.20.1']
13-
gemfile:
14-
- rails_52
15-
env:
16-
RAILS_ENV: test
17-
18-
steps:
19-
- uses: actions/checkout@v2
20-
- name: Add --no-document option to .gemrc file to speed up bundle install
21-
run: "echo 'gem: --no-document' > ~/.gemrc"
22-
- name: Set up Ruby
23-
uses: ruby/setup-ruby@v1
24-
with:
25-
ruby-version: ${{ matrix.ruby-version }}
26-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
27-
- name: Run CI task
28-
run: bundle exec rake
29-
test_rails_60:
8+
test_matrix:
309
runs-on: ubuntu-latest
3110
strategy:
3211
matrix:
3312
ruby-version: ['2.5.8', '2.7.6', 'jruby-9.2.20.1']
3413
gemfile:
14+
- rails_52
3515
- rails_60
36-
env:
37-
RAILS_ENV: test
38-
39-
steps:
40-
- uses: actions/checkout@v2
41-
- name: Add --no-document option to .gemrc file to speed up bundle install
42-
run: "echo 'gem: --no-document' > ~/.gemrc"
43-
- name: Set up Ruby
44-
uses: ruby/setup-ruby@v1
45-
with:
46-
ruby-version: ${{ matrix.ruby-version }}
47-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
48-
- name: Run CI task
49-
run: bundle exec rake
50-
test_rails_61:
51-
runs-on: ubuntu-latest
52-
strategy:
53-
matrix:
54-
ruby-version: ['2.5.8', '2.7.6', 'jruby-9.2.20.1']
55-
gemfile:
5616
- rails_61
57-
env:
58-
RAILS_ENV: test
17+
include:
18+
- ruby-version: 2.2.10
19+
gemfile: rails_52
20+
- ruby-version: 2.7.6
21+
gemfile: rails_70
22+
exclude:
23+
- ruby-version: 2.7.6
24+
gemfile: rails_52
5925

60-
steps:
61-
- uses: actions/checkout@v2
62-
- name: Add --no-document option to .gemrc file to speed up bundle install
63-
run: "echo 'gem: --no-document' > ~/.gemrc"
64-
- name: Set up Ruby
65-
uses: ruby/setup-ruby@v1
66-
with:
67-
ruby-version: ${{ matrix.ruby-version }}
68-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
69-
- name: Run CI task
70-
run: bundle exec rake
71-
test_rails_70:
72-
runs-on: ubuntu-latest
73-
strategy:
74-
matrix:
75-
ruby-version: ['2.7.6']
76-
gemfile:
77-
- rails_70
7826
env:
7927
RAILS_ENV: test
8028

0 commit comments

Comments
 (0)