-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (37 loc) · 1.12 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
env:
CC_TEST_REPORTER_BINARY_URL: https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
name: Continuous Integration
on:
push:
branches:
- 'main' # Set a branch to deploy
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4', head]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
# prepare CC test reporter
- name: Download CC test reporter binary
run: |
curl -L ${CC_TEST_REPORTER_BINARY_URL} > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
# run tests
- name: Run tests
run: bin/test
# report to CC
- run: ./cc-test-reporter after-build --exit-code 1
if: ${{ failure() }}
- run: ./cc-test-reporter after-build --exit-code 0
if: ${{ success() }}