-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (77 loc) · 1.89 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
rubocop:
name: RuboCop
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Rubocop checks
uses: bmhughes/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
markdownlint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run Markdown Lint
uses: actionshub/markdownlint@main
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '2.5', '2.6', '2.7', '3.0' ]
name: Test - Ruby ${{ matrix.ruby }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Ruby ${{ matrix.ruby }}
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Rake Test - Ruby ${{ matrix.ruby }}
run: |
ruby -v
gem install bundler
bundle install
rake test
- name: Simplecov Report
uses: aki77/simplecov-report-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ubuntu-latest
name: Build
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Ruby 3.0
uses: actions/setup-ruby@v1
with:
ruby-version: 3.0
- name: Rake Build
run: |
ruby -v
gem install bundler
bundle install
rake clean test build
- name: Archive build artifacts
uses: actions/upload-artifact@v2
with:
name: gem-file
path: pkg/*.gem
retention-days: 5
- name: Archive coverage report
uses: actions/upload-artifact@v2
with:
name: coverage-report
path: coverage/
retention-days: 3
...