-
Notifications
You must be signed in to change notification settings - Fork 31
58 lines (48 loc) · 1.63 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
48
49
50
51
52
53
54
55
56
57
58
name: Tests
on: [push, pull_request]
jobs:
test:
name: Ruby ${{ matrix.versions.ruby }}, Rails ${{ matrix.versions.rails }}
runs-on: ubuntu-latest
strategy:
matrix:
versions:
- { ruby: "2.5.x", rails: "5.0.x", node: "12" }
- { ruby: "2.6.x", rails: "5.0.x", node: "12" }
- { ruby: "2.5.x", rails: "5.1.x", node: "12" }
- { ruby: "2.6.x", rails: "5.1.x", node: "12" }
- { ruby: "2.5.x", rails: "5.2.x", node: "12" }
- { ruby: "2.6.x", rails: "5.2.x", node: "12" }
- { ruby: "2.5.x", rails: "6.0.x", node: "12" }
- { ruby: "2.6.x", rails: "6.0.x", node: "12" }
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
id: cache
with:
path: gemfiles/vendor/bundle
key: ruby-${{ matrix.versions.ruby }}-rails-${{ matrix.versions.rails }}-node-${{ matrix.versions.node }}
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.versions.ruby }}
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.versions.node }}
- name: Set up bundler
run: |
echo 'gem: --no-document' >> ~/.gemrc
gem install bundler
bundle config --global gemfile gemfiles/rails_${{ matrix.versions.rails }}.gemfile
bundle config --global path vendor/bundle
- name: Install gems
run: |
bundle install --jobs $(nproc) --retry 3
- name: Set up yarn
run: |
npm i -g yarn
yarn
- name: Test with Rake
run: |
bundle exec rake test:all_with_coverage