-
Notifications
You must be signed in to change notification settings - Fork 7
38 lines (36 loc) · 1.1 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
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1']
name: Lint & Test with Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v2
- name: 'Install build dependencies'
run: |
sudo apt-get update
sudo apt-get install -yq libcurl4-openssl-dev
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run test suite
if: matrix.ruby != 3.0
run: bundle exec rake
- name: Run test suite and publish Code Climate report
if: matrix.ruby == '3.0'
env:
CC_TEST_REPORTER_ID: e6d4bb7235b740943569bfe50196b620353970884a75f466d11cd37a2fc250f6
run: |
./cc-test-reporter before-build
bundle exec rake
./cc-test-reporter after-build --exit-code $?