-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (48 loc) · 1.31 KB
/
ruby.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
---
name: ci
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
name: ruby
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
ruby: ["2.7", "3.0", "3.1"]
rust: ["1.51.0", "1.54.0", "1.60.0", "1.62.1", "1.65.0"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Set up Rust
uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
- name: Cache gems
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('.tool-versions') }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-${{ hashFiles('.tool-versions') }}-${{ hashFiles('**/Gemfile.lock') }}
- name: Run yarn
run: yarn
- name: Install dependencies
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
env:
RAILS_ENV: test
- name: Run tests
run: bundle exec rake spec
env:
RAILS_ENV: test