-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (70 loc) · 1.66 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Ruby
on:
push:
branches:
- master
- main
- develop
pull_request:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
- name: Build
run: bundle exec rake build
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
path: pkg/*.gem
test:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
ruby-version:
- '3.1'
- '3.2'
- '3.3'
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: bundle exec rake spec
- name: Test Report Ruby ${{ matrix.ruby-version }}
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: test-reports/rspec.xml
check_name: RSpec Test Report Ruby ${{ matrix.ruby-version }}
detailed_summary: true
- name: Code Coverage Report Ruby ${{ matrix.ruby-version }}
uses: irongut/[email protected]
with:
filename: coverage/coverage.xml
badge: true
indicators: true
hide_branch_rate: true
verify:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
- name: Documentation
run: bundle exec rake yard
- name: Rubocop
run: bundle exec rake rubocop