-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.34 KB
/
test.yml
File metadata and controls
61 lines (51 loc) · 1.34 KB
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
59
60
61
name: Tests
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.2']
fail-fast: false
max-parallel: 4
env:
RAILS_ENV: test
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Add platform to bundle
run: |
bundle lock --add-platform x86_64-linux
bundle lock --add-platform ruby
bundle lock --add-platform x86_64-darwin
bundle lock --add-platform arm64-darwin
- name: Install dependencies
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Cache RuboCop
uses: actions/cache@v3
with:
path: ~/.cache/rubocop_cache
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/.rubocop.yml') }}
restore-keys: |
${{ runner.os }}-rubocop-
- name: Run tests
run: bundle exec rspec --format progress
- name: Run rubocop
run: bundle exec rubocop --parallel --format github