-
Notifications
You must be signed in to change notification settings - Fork 19
55 lines (50 loc) · 1.4 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
name: CI
on:
pull_request:
branches: ["master", "main"]
push:
branches: ["master", "main"]
jobs:
linters:
runs-on: ubuntu-latest
name: linter/ruby
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- name: Run linters
run: bundle exec rake code_analysis
test:
runs-on: ubuntu-latest
container: ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
include:
- ruby: ruby:2.5
- ruby: ruby:2.6
- ruby: ruby:2.7
- ruby: ruby:3.0
coverage: true
name: test/ruby ${{ matrix.ruby }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Bundle install
run: bundle install -j$(nproc) --retry 3
- name: Run tests
run: bundle exec rspec
timeout-minutes: 1
- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v3.0.0
if: matrix.coverage && github.ref == 'refs/heads/master'
env:
CC_TEST_REPORTER_ID: cb01575b98b3b80848a3bc292ca6145860871470e5d0669453030d36578f9115
with:
coverageCommand: bundle exec rspec
coverageLocations: ${{ github.workspace }}/coverage/coverage.json:simplecov
debug: true