-
Notifications
You must be signed in to change notification settings - Fork 56
60 lines (49 loc) · 1.22 KB
/
ci.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
59
60
name: CI
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 0 * * 0'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby_version: ['3.2', '3.1', '3.0', '2.7']
steps:
- uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Bundle update
run: |
bundle update
- name: Run test
run: |
bundle exec rspec --profile 10 \
--format RspecJunitFormatter \
--out test_results/rspec.xml \
--format progress
- name: Upload code coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage/coverage.xml
- name: Run rubocop
run: |
bundle exec rake rubocop
- name: Run rufo
run: |
bundle exec rake rufo:run
- name: Verify rufo works against sample codebases
run: |
bin/verify-sample-code
- name: Save test results
uses: actions/upload-artifact@v3
if: always()
with:
name: coverage-ruby-${{ matrix.ruby_version }}
path: coverage