-
-
Notifications
You must be signed in to change notification settings - Fork 277
77 lines (70 loc) · 1.95 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
66
67
68
69
70
71
72
73
74
75
76
77
name: ci
on:
pull_request:
push:
branches: [ main ]
jobs:
coverage:
services:
toxiproxy:
image: ghcr.io/shopify/toxiproxy
ports:
- 8474:8474
- 21212:21212
redis:
image: redis:latest
ports:
- 6379:6379
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
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: 88e524e8f638efe690def7a6e2c72b1a9db5cdfa74548921b734d609a5858ee5
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 --tag ~perf
./cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
rspec:
services:
toxiproxy:
image: ghcr.io/shopify/toxiproxy
ports:
- 8474:8474
- 21212:21212
redis:
image: redis:latest
ports:
- 6379:6379
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
ruby: ["2.7", '3.0', "3.1", "3.2", "3.3"]
gemfile:
- sidekiq_7.0
- sidekiq_7.1
- sidekiq_7.2
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: >-
REDIS_HOST=localhost
TOXI_REDIS_URL=toxiproxy:21212
TOXI_PROXY_HOST=http://toxiproxy:8474
bin/rspec --require spec_helper --tag ~perf