Skip to content

Commit 33757ad

Browse files
committed
Update CI
1 parent 1d08a0c commit 33757ad

File tree

1 file changed

+39
-27
lines changed

1 file changed

+39
-27
lines changed

.github/workflows/specs.yml

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,51 +14,66 @@ jobs:
1414
lint:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v1
17+
- uses: actions/checkout@v4
1818
- name: Set up Ruby
1919
uses: ruby/setup-ruby@v1
2020
with:
21-
ruby-version: "2.4"
21+
ruby-version: "3.4"
2222
- name: Install bundler
23-
run: gem install bundler
24-
- name: Run rubocop
25-
run: bin/rubocop -ESD
23+
run: gem install standard
24+
- name: Run standardrb
25+
run: standardrb
2626

27-
spec:
27+
test:
2828
runs-on: ubuntu-latest
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
ruby: ["2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "jruby", "truffleruby"]
33-
include:
34-
- ruby: "3.0"
35-
coverage: "true"
32+
ruby:
33+
- "2.4"
34+
- "2.5"
35+
- "2.6"
36+
- "2.7"
37+
- "3.0"
38+
- "3.1"
39+
- "3.2"
40+
- "3.3"
41+
- "3.4"
42+
- "head"
43+
- "jruby-9.4"
44+
- "jruby-10"
45+
- "truffleruby"
3646
steps:
37-
- uses: actions/checkout@v2
47+
- uses: actions/checkout@v4
3848
- name: Set up Ruby
3949
uses: ruby/setup-ruby@v1
4050
with:
4151
ruby-version: ${{matrix.ruby}}
4252
bundler-cache: true
53+
- name: Run all tests
54+
run: bundle exec rake
55+
56+
coverage:
57+
runs-on: ubuntu-latest
58+
needs: test
59+
steps:
60+
- uses: actions/checkout@v4
61+
- name: Set up Ruby
62+
uses: ruby/setup-ruby@v1
63+
with:
64+
ruby-version: "3.4"
65+
bundler-cache: true
4366
- name: Download test reporter
44-
if: "matrix.coverage == 'true'"
4567
run: |
4668
mkdir -p tmp/
47-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.9.0-linux-amd64 > ./tmp/cc-test-reporter
69+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter
4870
chmod +x ./tmp/cc-test-reporter
4971
./tmp/cc-test-reporter before-build
50-
- name: Bundle install
51-
env:
52-
COVERAGE: ${{matrix.coverage}}
53-
run: |
54-
gem install bundler
55-
bundle install --jobs 4 --retry 3 --without tools docs benchmarks
5672
- name: Run all tests
5773
env:
58-
COVERAGE: ${{matrix.coverage}}
74+
COVERAGE: "true"
5975
run: bundle exec rake
6076
- name: Send coverage results
61-
if: "matrix.coverage == 'true'"
6277
env:
6378
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
6479
GIT_COMMIT_SHA: ${{github.sha}}
@@ -74,23 +89,20 @@ jobs:
7489
mutant:
7590
name: Mutant
7691
runs-on: ubuntu-latest
92+
needs: [test, coverage]
7793
continue-on-error: true
7894
timeout-minutes: 10
7995
strategy:
8096
fail-fast: false
8197
matrix:
82-
ruby: ["2.6", "2.7", "3.0", "3.1"]
98+
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
8399
steps:
84-
- uses: actions/checkout@v2
100+
- uses: actions/checkout@v4
85101
with:
86102
fetch-depth: 2
87103
- name: Set up Ruby
88104
uses: ruby/setup-ruby@v1
89105
with:
90106
ruby-version: ${{matrix.ruby}}
91107
bundler-cache: true
92-
- name: Bundle install
93-
run: |
94-
gem install bundler
95-
bundle install --jobs 4 --retry 3 --without tools docs benchmarks
96108
- run: bundle exec mutant run --since HEAD~1 --zombie

0 commit comments

Comments
 (0)