|
1 | | -version: 2 |
2 | | - |
3 | | -rspec: &rspec |
4 | | - steps: |
5 | | - - checkout |
6 | | - - run: bundle install |
7 | | - - run: rake spec |
8 | | - |
9 | | -rubocop: &rubocop |
10 | | - steps: |
11 | | - - checkout |
12 | | - - run: bundle install |
13 | | - - run: rake internal_investigation |
| 1 | +version: 2.1 |
14 | 2 |
|
15 | 3 | jobs: |
16 | 4 | confirm_config_and_documentation: |
|
21 | 9 | - run: bundle install |
22 | 10 | - run: rake confirm_config documentation_syntax_check confirm_documentation |
23 | 11 |
|
24 | | - # Ruby 2.4 |
25 | | - ruby-2.4-rspec: |
26 | | - docker: |
27 | | - - image: circleci/ruby:2.4 |
28 | | - <<: *rspec |
29 | | - ruby-2.4-rubocop: |
30 | | - docker: |
31 | | - - image: circleci/ruby:2.4 |
32 | | - <<: *rubocop |
33 | | - |
34 | | - # Ruby 2.5 |
35 | | - ruby-2.5-rspec: |
36 | | - docker: |
37 | | - - image: circleci/ruby:2.5 |
38 | | - <<: *rspec |
39 | | - ruby-2.5-rubocop: |
40 | | - docker: |
41 | | - - image: circleci/ruby:2.5 |
42 | | - <<: *rubocop |
43 | | - |
44 | | - # Ruby 2.6 |
45 | | - ruby-2.6-rspec: |
46 | | - docker: |
47 | | - - image: circleci/ruby:2.6 |
48 | | - <<: *rspec |
49 | | - ruby-2.6-rubocop: |
| 12 | + rspec: |
| 13 | + parameters: |
| 14 | + ruby: |
| 15 | + type: string |
50 | 16 | docker: |
51 | | - - image: circleci/ruby:2.6 |
52 | | - <<: *rubocop |
| 17 | + - image: circleci/ruby:<<parameters.ruby>> |
| 18 | + steps: |
| 19 | + - checkout |
| 20 | + - run: bundle install |
| 21 | + - run: rake spec |
53 | 22 |
|
54 | | - # Ruby 2.7 |
55 | | - ruby-2.7-rspec: |
56 | | - docker: |
57 | | - - image: circleci/ruby:2.7 |
58 | | - <<: *rspec |
59 | | - ruby-2.7-rubocop: |
| 23 | + rubocop: |
| 24 | + parameters: |
| 25 | + ruby: |
| 26 | + type: string |
60 | 27 | docker: |
61 | | - - image: circleci/ruby:2.7 |
62 | | - <<: *rubocop |
| 28 | + - image: circleci/ruby:<<parameters.ruby>> |
| 29 | + steps: |
| 30 | + - checkout |
| 31 | + - run: bundle install |
| 32 | + - run: rake internal_investigation |
63 | 33 |
|
64 | 34 | edge-rubocop: |
65 | 35 | docker: |
@@ -118,22 +88,16 @@ workflows: |
118 | 88 | - confirm_config_and_documentation |
119 | 89 |
|
120 | 90 | # Use `requires: [confirm_config_and_documentation]` to trick Circle CI into starting the slow jruby job early. |
121 | | - - ruby-2.4-rspec: |
122 | | - requires: [confirm_config_and_documentation] |
123 | | - - ruby-2.4-rubocop: |
124 | | - requires: [confirm_config_and_documentation] |
125 | | - - ruby-2.5-rspec: |
126 | | - requires: [confirm_config_and_documentation] |
127 | | - - ruby-2.5-rubocop: |
128 | | - requires: [confirm_config_and_documentation] |
129 | | - - ruby-2.6-rspec: |
130 | | - requires: [confirm_config_and_documentation] |
131 | | - - ruby-2.6-rubocop: |
132 | | - requires: [confirm_config_and_documentation] |
133 | | - - ruby-2.7-rspec: |
| 91 | + - rspec: |
134 | 92 | requires: [confirm_config_and_documentation] |
135 | | - - ruby-2.7-rubocop: |
| 93 | + matrix: |
| 94 | + parameters: |
| 95 | + ruby: ['2.4', '2.5', '2.6', '2.7'] |
| 96 | + - rubocop: |
136 | 97 | requires: [confirm_config_and_documentation] |
| 98 | + matrix: |
| 99 | + parameters: |
| 100 | + ruby: ['2.4', '2.5', '2.6', '2.7'] |
137 | 101 | - edge-rubocop: |
138 | 102 | requires: [confirm_config_and_documentation] |
139 | 103 | - jruby |
|
0 commit comments