-
-
Notifications
You must be signed in to change notification settings - Fork 87
43 lines (43 loc) · 1.33 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: CI build
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby:
- '2.5'
- '2.6'
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- head
- jruby
- jruby-head
- truffleruby
- truffleruby-head
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake
# NOTE: calling "bundle install" because the cache apparently did not update due to the gemspec injection
- run: bundle install && bundle exec standardrb
if: matrix.ruby == '3.2' # not using "head" because rubocop won't work there yet
# What's below helps having a single "status check" for mergeability, without
# having to add each new version to the list of expected status checks in GitHub.
# See https://github.community/t/status-check-for-a-matrix-jobs/127354/7
global:
if: ${{ always() }}
runs-on: ubuntu-latest
name: build (matrix)
needs: build
steps:
- name: Check build matrix status
if: ${{ needs.build.result != 'success' }}
run: exit 1