-
-
Notifications
You must be signed in to change notification settings - Fork 532
84 lines (80 loc) · 2.67 KB
/
sentry_ruby_test.yml
File metadata and controls
84 lines (80 loc) · 2.67 KB
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
78
79
80
81
82
83
84
name: sentry-ruby Test
on:
workflow_dispatch:
workflow_call:
inputs:
versions:
required: true
type: string
# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: sentry-ruby-test-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
defaults:
run:
working-directory: sentry-ruby
name: Ruby ${{ matrix.ruby_version }} & Rack ${{ matrix.rack_version }}, options - ${{ toJson(matrix.options) }}
runs-on: ubuntu-latest
timeout-minutes: 10
services:
redis:
image: redis:6
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RUBYOPT: ${{ matrix.options.rubyopt }}
BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-ruby/Gemfile
BUNDLE_WITHOUT: rubocop
RACK_VERSION: ${{ matrix.rack_version }}
REDIS_RB_VERSION: ${{ matrix.redis_rb_version }}
JRUBY_OPTS: "--debug" # for more accurate test coverage
strategy:
fail-fast: false
matrix:
ruby_version: ${{ fromJson(inputs.versions) }}
rack_version: [2.0, 3.0, 3.1]
redis_rb_version: [4.0]
include:
- ruby_version: 3.2
rack_version: 0
redis_rb_version: 5.0
- ruby_version: 3.2
rack_version: 2.0
redis_rb_version: 5.0
- ruby_version: 3.2
rack_version: 3.0
redis_rb_version: 5.0
options:
rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal"
- ruby_version: 3.2
rack_version: 3.0
- ruby_version: 3.3
rack_version: 3.1
redis_rb_version: 5.3
- ruby_version: 3.4
rack_version: 3.1
redis_rb_version: 5.3
exclude:
- ruby_version: 'jruby'
- ruby_version: 'jruby-head'
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Ruby ${{ matrix.ruby_version }}
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Run specs with Rack ${{ matrix.rack_version }} and redis-rb ${{ matrix.redis_rb_version }}
run: bundle exec rake
- name: Upload Coverage
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}