Skip to content

Commit 3f82376

Browse files
authored
CI: Run Ruby 2.x in docker (#1618)
2 parents f7bfad9 + 2ef0eb6 commit 3f82376

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,45 @@ jobs:
55
build:
66
name: "Ruby: ${{ matrix.ruby }} OS: ${{ matrix.os }}"
77
runs-on: ${{ matrix.os }}
8+
container: ${{ matrix.container }}
89
strategy:
910
fail-fast: false
1011
matrix:
1112
os: [ubuntu-latest, macos-latest, windows-latest]
1213
# 3.0 is interpreted as 3
1314
ruby: ["3.0", 3.1, 3.2, 3.3, 3.4]
14-
exclude:
15-
- { os: windows-latest, ruby: 2.2 }
16-
- { os: windows-latest, ruby: 2.3 }
15+
include:
16+
- os: ubuntu-latest
17+
container: ruby:2.2
18+
ruby: 2.2
19+
- os: ubuntu-latest
20+
container: ruby:2.3
21+
ruby: 2.3
22+
- os: ubuntu-latest
23+
container: ruby:2.4
24+
ruby: 2.4
25+
- os: ubuntu-latest
26+
container: ruby:2.5
27+
ruby: 2.5
28+
- os: ubuntu-latest
29+
container: ruby:2.6
30+
ruby: 2.6
31+
- os: ubuntu-latest
32+
container: ruby:2.7
33+
ruby: 2.7
34+
1735
steps:
1836
- name: Checkout
19-
uses: actions/checkout@v4
37+
uses: actions/checkout@v1
2038
- name: Install Ruby & 'bundle install'
39+
if: matrix.container == null
2140
uses: ruby/setup-ruby@v1
2241
with:
2342
ruby-version: ${{ matrix.ruby }}
2443
bundler-cache: true
44+
- name: Bundle install
45+
if: matrix.container != null
46+
run: bundle install --jobs=4 --retry=3
2547
- name: Run Test
2648
run: |
2749
ruby -v

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def self.parser_type; @parser_type == :ruby ? :ruby18 : @parser_type end
2727
begin
2828
require 'coveralls'
2929
Coveralls.wear!
30-
end if ENV['CI'] && HAVE_RIPPER
30+
end if ENV['CI'] && HAVE_RIPPER && RUBY_VERSION >= '2.5.0'
3131

3232
NAMED_OPTIONAL_ARGUMENTS = RUBY_VERSION >= '2.1.0'
3333

0 commit comments

Comments
 (0)