-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (47 loc) · 1.15 KB
/
main.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: Ruby
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['2.7', '3.0', '3.1', '3.2']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Start Redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: 5
- name: Run Rspec
run: bundle exec rspec
- if: ${{ matrix.ruby == '3.2' }}
name: Upload coverage results
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: coverage
- name: Run Rubocop
run: bundle exec rubocop --config .rubocop/ruby-${{ matrix.ruby }}.yml
coverage:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download coverage report
uses: actions/download-artifact@v3
with:
name: coverage-report
path: coverage
- name: Check coverage
uses: vigetlabs/[email protected]
with:
minimum_coverage: 100
coverage_path: coverage/.last_run.json