-
-
Notifications
You must be signed in to change notification settings - Fork 13
65 lines (58 loc) · 1.6 KB
/
rspec.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
name: ci
on:
pull_request:
push:
branches: [ master ]
jobs:
coverage:
services:
redis:
image: redis:latest
ports:
- 6379:6379
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler: 2.4.12
bundler-cache: true
- name: Install Code Climate reporter
run: |
sudo curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
sudo chmod +x ./cc-test-reporter
- name: Generate Coverage
env:
CC_TEST_REPORTER_ID: e8ee6fccdc36b46acdc96337bb39b2c17ccd824e413649a4d94fd0dd35891d0f
run: |
export GIT_BRANCH=${GITHUB_REF#refs/heads/}
export GIT_COMMIT_SHA=${GITHUB_SHA}
echo $GIT_BRANCH
echo $GIT_COMMIT_SHA
./cc-test-reporter before-build
COV=true bin/rspec --require spec_helper
./cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
rspec:
services:
redis:
image: redis:latest
ports:
- 6379:6379
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [2.6, 2.7, '3.0', 3.1, 3.2]
gemfile:
- redis_3.x
- redis_4.x
- redis_5.x
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: 2.4.12
bundler-cache: true
- run: bin/rspec --format doc