-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.29 KB
/
ci.yml
File metadata and controls
61 lines (51 loc) · 1.29 KB
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
name: Ruby CI
on:
pull_request:
push:
branches:
- main
jobs:
rubocop:
runs-on: ubuntu-latest
timeout-minutes: 5
env:
RUBOCOP_CACHE_ROOT: tmp/rubocop
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup RuboCop cache
uses: actions/cache@v4
id: cache-rubocop
with:
path: ${{ env.RUBOCOP_CACHE_ROOT }}
key: ${{ runner.os }}-rubocop-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-rubocop-
- name: Run RuboCop
run: bundle exec rubocop --format github --format clang
tests:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
COVER: true
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run tests
run: bundle exec rspec
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}