-
Notifications
You must be signed in to change notification settings - Fork 1
209 lines (184 loc) · 7.35 KB
/
tests.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
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
name: Tests
on: [push, pull_request, workflow_dispatch]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
skip_duplicate_runs:
uses: ./.github/workflows/skip_duplicate_workflow_runs.yml
rubocop:
name: RuboCop linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true # `bundle install` and cache
- name: rubocop
run: bundle exec rake rubocop
test_mri:
name: >-
${{ matrix.os }} ${{ matrix.ruby }}${{ matrix.no-ssl }}${{ matrix.yjit }}${{ matrix.rack-v }}
needs: [rubocop, skip_duplicate_runs]
env:
CI: true
PUMA_TEST_DEBUG: true
TESTOPTS: -v
PUMA_NO_RUBOCOP: true
TERM: BugMinitest
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-22.04, ubuntu-24.04, macos-13, macos-14, macos-15, windows-2022 ]
ruby: [ 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3, head ]
no-ssl: ['']
rack-v: ['']
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: 2.7 , no-ssl: ' no SSL' }
- { os: ubuntu-22.04 , ruby: head , yjit: ' yjit' }
- { os: ubuntu-22.04 , ruby: 2.4 , rack-v: ' rack2' }
- { os: ubuntu-22.04 , ruby: 3.2 , rack-v: ' rack2' }
- { os: ubuntu-22.04 , ruby: 2.4 , rack-v: ' rack1' }
exclude:
- { os: ubuntu-22.04 , ruby: 2.4 }
- { os: ubuntu-22.04 , ruby: 2.5 }
- { os: ubuntu-22.04 , ruby: 2.6 }
- { os: ubuntu-22.04 , ruby: 2.7 }
- { os: ubuntu-22.04 , ruby: '3.0' }
- { os: ubuntu-24.04 , ruby: 2.4 }
- { os: ubuntu-24.04 , ruby: 2.5 }
- { os: ubuntu-24.04 , ruby: 2.6 }
- { os: ubuntu-24.04 , ruby: 2.7 }
- { os: ubuntu-24.04 , ruby: '3.0' }
- { os: macos-14 , ruby: 2.4 }
- { os: macos-14 , ruby: 2.5 }
- { os: macos-14 , ruby: 2.6 }
- { os: macos-14 , ruby: 2.7 }
- { os: macos-15 , ruby: 2.4 }
- { os: macos-15 , ruby: 2.5 }
- { os: macos-15 , ruby: 2.6 }
- { os: macos-15 , ruby: 2.7 }
- { os: macos-15 , ruby: '3.0' }
- { os: macos-15 , ruby: 3.2 }
- { os: windows-2022 , ruby: head }
steps:
- name: repo checkout
if: ${{ needs.skip_duplicate_runs.outputs.should_skip != 'true' }}
uses: actions/checkout@v4
- name: Compile Puma without SSL support
if: |
(matrix.no-ssl == ' no SSL') &&
(needs.skip_duplicate_runs.outputs.should_skip != 'true')
shell: bash
run: echo 'PUMA_DISABLE_SSL=true' >> $GITHUB_ENV
- name: Set Rack version, see Gemfile
shell: bash
run: echo 'PUMA_CI_RACK=${{ matrix.rack-v }}' >> $GITHUB_ENV
- name: load ruby
if: ${{ needs.skip_duplicate_runs.outputs.should_skip != 'true' }}
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
rubygems: latest
bundler-cache: true
timeout-minutes: 10
- name: Repo & Commit Info
if: ${{ needs.skip_duplicate_runs.outputs.should_skip != 'true' }}
run: ruby .github/workflows/github_actions_info.rb
- name: set WERRORFLAG
if: ${{ needs.skip_duplicate_runs.outputs.should_skip != 'true' }}
shell: bash
run: echo 'PUMA_MAKE_WARNINGS_INTO_ERRORS=true' >> $GITHUB_ENV
- name: compile
if: ${{ needs.skip_duplicate_runs.outputs.should_skip != 'true' }}
run: bundle exec rake compile
- name: Use yjit
if: |
(matrix.yjit == ' yjit') &&
(needs.skip_duplicate_runs.outputs.should_skip != 'true')
shell: bash
run: echo 'RUBYOPT=--yjit' >> $GITHUB_ENV
- name: test
if: ${{ needs.skip_duplicate_runs.outputs.should_skip != 'true' }}
timeout-minutes: 10
run: test/runner --verbose
test_non_mri:
name: >-
${{ matrix.os }} ${{ matrix.ruby }}${{ matrix.no-ssl }}
needs: [rubocop, skip_duplicate_runs]
env:
CI: true
PUMA_TEST_DEBUG: true
TESTOPTS: -v
PUMA_NO_RUBOCOP: true
TERM: BugMinitest
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:
# tto - test timeout
- { tto: 8 , os: ubuntu-22.04 , ruby: jruby }
- { tto: 8 , os: ubuntu-22.04 , ruby: jruby, no-ssl: ' no SSL' }
- { tto: 8 , os: ubuntu-22.04 , ruby: jruby-head, allow-failure: true }
- { tto: 8 , os: ubuntu-20.04 , ruby: truffleruby, allow-failure: true } # Until https://github.com/oracle/truffleruby/issues/2700 is solved
- { tto: 8 , os: ubuntu-20.04 , ruby: truffleruby-head, allow-failure: true }
- { tto: 8 , os: ubuntu-22.04 , ruby: truffleruby, allow-failure: true } # Until https://github.com/oracle/truffleruby/issues/2700 is solved
- { tto: 8 , os: ubuntu-22.04 , ruby: truffleruby-head, allow-failure: true }
- { tto: 8 , os: macos-13 , ruby: jruby }
- { tto: 8 , os: macos-14 , ruby: jruby }
- { tto: 8 , os: macos-13 , ruby: truffleruby, allow-failure: true }
steps:
- name: repo checkout
if: ${{ needs.skip_duplicate_runs.outputs.should_skip != 'true' }}
uses: actions/checkout@v4
- name: load ruby, ragel
if: ${{ needs.skip_duplicate_runs.outputs.should_skip != 'true' }}
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') &&
(needs.skip_duplicate_runs.outputs.should_skip != 'true')
shell: bash
run: echo 'PUMA_DISABLE_SSL=true' >> $GITHUB_ENV
- name: set WERRORFLAG
if: ${{ needs.skip_duplicate_runs.outputs.should_skip != 'true' }}
shell: bash
run: echo 'PUMA_MAKE_WARNINGS_INTO_ERRORS=true' >> $GITHUB_ENV
- name: compile
if: ${{ needs.skip_duplicate_runs.outputs.should_skip != 'true' }}
run: bundle exec rake compile
- name: test
id: test
timeout-minutes: ${{ matrix.tto }}
continue-on-error: ${{ matrix.allow-failure || false }}
if: | # only run if previous steps have succeeded
success() &&
(needs.skip_duplicate_runs.outputs.should_skip != 'true')
run: test/runner --verbose
- name: >-
Test outcome: ${{ steps.test.outcome }}
# every step must define a `uses` or `run` key
run: echo NOOP