-
-
Notifications
You must be signed in to change notification settings - Fork 5
129 lines (119 loc) · 3.87 KB
/
Copy pathtest.yaml
File metadata and controls
129 lines (119 loc) · 3.87 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
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
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 20 * * *'
permissions:
contents: read
env:
CONSOLE_OUTPUT: XTerm
jobs:
test:
name: ${{matrix.ruby}} ${{matrix.gemfile}} ${{matrix.server}} ${{matrix.endpoint}}
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{matrix.gemfile}}
RACK_CONFORM_SERVER: ${{matrix.server}}
RACK_CONFORM_ENDPOINT: ${{matrix.endpoint}}
strategy:
fail-fast: false
matrix:
include:
- ruby: ruby
name: "Webrick-Rack-v2-http"
gemfile: "gems/webrick-rack-v2.rb"
server: "rackup -s webrick"
endpoint: "http://localhost:9292"
- ruby: ruby
name: "Webrick-Rack-v3-http"
gemfile: "gems/webrick-rack-v3.rb"
server: "rackup -s webrick"
endpoint: "http://localhost:9292"
- ruby: ruby
name: "Falcon-v0-Rack-v2-https"
gemfile: "gems/falcon-v0-rack-v2.rb"
server: "falcon"
endpoint: "https://localhost:9292"
- ruby: ruby
name: "Falcon-v0-Rack-v3-https"
gemfile: "gems/falcon-v0-rack-v3.rb"
server: "falcon"
endpoint: "https://localhost:9292"
- ruby: ruby
name: "Falcon-v0-Rack-v3-http"
gemfile: "gems/falcon-v0-rack-v3.rb"
server: "falcon --bind http://localhost:9292"
endpoint: "http://localhost:9292"
- ruby: ruby
name: "Puma-v4-Rack-v2-http"
gemfile: "gems/puma-v4-rack-v2.rb"
server: "puma"
endpoint: "http://localhost:9292"
- ruby: ruby
name: "Puma-v5-Rack-v2-http"
gemfile: "gems/puma-v5-rack-v2.rb"
server: "puma"
endpoint: "http://localhost:9292"
- ruby: ruby
name: "Puma-v6-Rack-v2-http"
gemfile: "gems/puma-v6-rack-v2.rb"
server: "puma"
endpoint: "http://localhost:9292"
- ruby: ruby
name: "Puma-v6-Rack-v3-http"
gemfile: "gems/puma-v6-rack-v3.rb"
server: "puma"
endpoint: "http://localhost:9292"
- ruby: ruby
name: "Puma-head-Rack-v2-http"
gemfile: "gems/puma-head-rack-v2.rb"
server: "puma"
endpoint: "http://localhost:9292"
- ruby: ruby
name: "Puma-head-Rack-v3-http"
gemfile: "gems/puma-head-rack-v3.rb"
server: "puma"
endpoint: "http://localhost:9292"
- ruby: ruby
name: "Thin-v1-Rack-v2-http"
gemfile: "gems/thin-v1-rack-v2.rb"
server: "thin start"
endpoint: "http://localhost:3000"
- ruby: ruby
name: "Unicorn-v6-Rack-v2-http"
gemfile: "gems/unicorn-v6-rack-v2.rb"
server: "unicorn -E none"
endpoint: "http://localhost:8080"
- ruby: ruby
name: "Pitchfork-head-Rack-v2-http"
gemfile: "gems/pitchfork-head-rack-v2.rb"
server: "pitchfork -E none"
endpoint: "http://localhost:8080"
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true
- name: Run tests
timeout-minutes: 10
run: bundle exec bake test
- name: Dump server log
if: failure()
run: cat server.log
- name: Run benchmarks
timeout-minutes: 10
run: |
sleep 60
bundle exec ${{matrix.server}} &
bundle exec benchmark-http wait ${{matrix.endpoint}}
bundle exec benchmark-http latency ${{matrix.endpoint}}
- uses: actions/upload-artifact@v4
with:
name: Ruby-${{matrix.ruby}}-${{matrix.name}} Logs
path: "*.log"