-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (67 loc) · 1.9 KB
/
checks.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
name: Ruby
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 5 * * MON'
concurrency:
# Pushing new changes to a branch will cancel any in-progress CI runs
group: ${{ github.ref }}
cancel-in-progress: true
# Restrict jobs in this workflow to only be allowed to read this repo by default.
#
# If you are wanting to introduce a job/tool that requires more permissions (such
# as posting comments or commits to the repository), then you should grant just
# that job the necessarily permissions by giving it a dedicated `permissions` block.
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
- run: npx prettier --check .
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ruby: ['2.6', '2.7', '3.0', '3.1', head]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rspec
- name: Archive spec outputs
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: rspec-output-coverage-${{ matrix.os }}-${{ matrix.ruby }}
path: coverage/
retention-days: 5
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
bundler-cache: true
- run: bundle exec rubocop