-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (45 loc) · 1.18 KB
/
test.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
44
45
46
47
name: Run tests
on:
pull_request:
push:
branches:
- '**'
tags-ignore:
- 'v*'
jobs:
test:
name: "Run tests"
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ruby: 3.0
- ruby: 2.7
- ruby: 2.6
- ruby: 2.5
container:
image: ruby:${{ matrix.ruby }}
env:
CI: true
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: vendor/bundle
key: bundle-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/Gemfile') }}
restore-keys: |
bundle-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/Gemfile') }}
bundle-${{ matrix.ruby }}-
- name: Upgrade Bundler to 2.0 (for older Rubies)
run: gem install bundler -v '~> 2.0'
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install
bundle update
- name: Run Rubocop
run: bundle exec rubocop
- name: Run RSpec
run: bundle exec rspec