-
Notifications
You must be signed in to change notification settings - Fork 1.4k
191 lines (168 loc) · 5.51 KB
/
tests.yaml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
name: Tests
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
jobs:
rubocop:
name: 'Rubocop linting'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true # `bundle install` and cache
- name: rubocop
run: bundle exec rake rubocop
test_mri:
name: >-
MRI: ${{ matrix.os }} ${{ matrix.ruby }}${{ matrix.no-ssl }}${{ matrix.yjit }}
needs: rubocop
env:
CI: true
PUMA_TEST_DEBUG: true
TESTOPTS: -v
PUMA_NO_RUBOCOP: true
runs-on: ${{ matrix.os }}
if: |
!( contains(github.event.pull_request.title, '[ci skip]')
|| contains(github.event.pull_request.title, '[skip ci]'))
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-18.04, macos-10.15, macos-11, macos-12, windows-2022 ]
ruby: [ 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, head ]
no-ssl: ['']
yjit: ['']
include:
- { os: windows-2022 , ruby: ucrt }
- { os: windows-2022 , ruby: mswin }
- { os: windows-2022 , ruby: 2.7 , no-ssl: ' no SSL' }
- { os: ubuntu-20.04 , ruby: head , yjit: ' yjit' }
- { os: ubuntu-20.04 , ruby: 2.7 , no-ssl: ' no SSL' }
- { os: ubuntu-22.04 , ruby: 3.1 }
- { os: ubuntu-22.04 , ruby: head }
exclude:
- { os: windows-2022 , ruby: head }
- { os: macos-10.15 , ruby: 2.7 }
- { os: macos-10.15 , ruby: '3.0'}
- { os: macos-10.15 , ruby: 3.1 }
- { os: macos-10.15 , ruby: head }
- { os: macos-11 , ruby: 2.4 }
- { os: macos-11 , ruby: 2.5 }
- { os: macos-12 , ruby: 2.4 }
- { os: macos-12 , ruby: 2.5 }
- { os: macos-12 , ruby: 2.6 }
steps:
- name: repo checkout
uses: actions/checkout@v3
- name: load ruby
uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{ matrix.ruby }}
apt-get: ragel
brew: ragel
# below is only needed for Ruby 2.4
mingw: openssl
bundler-cache: true
timeout-minutes: 10
# fixes 'has a bug that prevents `required_ruby_version`'
- name: update rubygems for Ruby 2.4 - 2.5
if: contains('2.4 2.5', matrix.ruby)
run: gem update --system 3.3.14 --no-document
continue-on-error: true
timeout-minutes: 5
- name: Compile Puma without SSL support
if: matrix.no-ssl == ' no SSL'
shell: bash
run: echo 'PUMA_DISABLE_SSL=true' >> $GITHUB_ENV
- name: set WERRORFLAG
shell: bash
run: echo 'PUMA_MAKE_WARNINGS_INTO_ERRORS=true' >> $GITHUB_ENV
- name: compile
run: bundle exec rake compile
- name: Use yjit
if: matrix.yjit == ' yjit'
shell: bash
run: echo 'RUBYOPT=--yjit' >> $GITHUB_ENV
- name: test
timeout-minutes: 10
run: bundle exec rake test:all
test_non_mri:
name: >-
NON-MRI: ${{ matrix.os }} ${{ matrix.ruby }}${{ matrix.no-ssl }}
needs: rubocop
env:
CI: true
TESTOPTS: -v
PUMA_NO_RUBOCOP: true
runs-on: ${{ matrix.os }}
if: |
!( contains(github.event.pull_request.title, '[ci skip]')
|| contains(github.event.pull_request.title, '[skip ci]'))
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-20.04 , ruby: jruby }
- { os: ubuntu-20.04 , ruby: jruby, no-ssl: ' no SSL' }
- { os: ubuntu-20.04 , ruby: jruby-head, allow-failure: true }
- { os: ubuntu-20.04 , ruby: truffleruby }
- { os: ubuntu-20.04 , ruby: truffleruby-head, allow-failure: true }
- { os: macos-10.15 , ruby: jruby }
- { os: macos-10.15 , ruby: truffleruby }
- { os: macos-11 , ruby: jruby }
- { os: macos-11 , ruby: truffleruby }
steps:
- name: repo checkout
uses: actions/checkout@v3
- name: set JAVA_HOME
if: startsWith(matrix.os, 'macos')
shell: bash
run: |
echo JAVA_HOME=$JAVA_HOME_11_X64 >> $GITHUB_ENV
- name: load ruby, ragel
uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{ matrix.ruby }}
apt-get: ragel
brew: ragel
bundler: none
bundler-cache: true
timeout-minutes: 10
- name: Compile Puma without SSL support
if: matrix.no-ssl == ' no SSL'
shell: bash
run: echo 'PUMA_DISABLE_SSL=true' >> $GITHUB_ENV
- name: set WERRORFLAG
shell: bash
run: echo 'PUMA_MAKE_WARNINGS_INTO_ERRORS=true' >> $GITHUB_ENV
- name: compile
run: bundle exec rake compile
- name: test
id: test
timeout-minutes: 12
continue-on-error: ${{ matrix.allow-failure || false }}
if: success() # only run if previous steps have succeeded
run: bundle exec rake test:all
- name: >-
Test outcome: ${{ steps.test.outcome }}
# every step must define a `uses` or `run` key
run: echo NOOP
valgrind:
runs-on: ubuntu-latest
env:
PUMA_RUBY_MEMCHECK: true
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
apt-get: valgrind
- run: bundle exec rake test:valgrind