Skip to content

Test

Test #533

Workflow file for this run

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: "3.4"
name: "Webrick-Rack-v2-http"
gemfile: "gems/webrick-rack-v2.rb"
server: "rackup -s webrick"
endpoint: "http://localhost:9292"
- ruby: "3.4"
name: "Webrick-Rack-v3-http"
gemfile: "gems/webrick-rack-v3.rb"
server: "rackup -s webrick"
endpoint: "http://localhost:9292"
- ruby: "3.4"
name: "Falcon-v0-Rack-v2-https"
gemfile: "gems/falcon-v0-rack-v2.rb"
server: "falcon"
endpoint: "https://localhost:9292"
- ruby: "3.4"
name: "Falcon-v0-Rack-v3-https"
gemfile: "gems/falcon-v0-rack-v3.rb"
server: "falcon"
endpoint: "https://localhost:9292"
- ruby: "3.4"
name: "Falcon-v0-Rack-v3-http"
gemfile: "gems/falcon-v0-rack-v3.rb"
server: "falcon --bind http://localhost:9292"
endpoint: "http://localhost:9292"
- ruby: "3.4"
name: "Puma-v4-Rack-v2-http"
gemfile: "gems/puma-v4-rack-v2.rb"
server: "puma"
endpoint: "http://localhost:9292"
- ruby: "3.4"
name: "Puma-v5-Rack-v2-http"
gemfile: "gems/puma-v5-rack-v2.rb"
server: "puma"
endpoint: "http://localhost:9292"
- ruby: "3.4"
name: "Puma-v6-Rack-v2-http"
gemfile: "gems/puma-v6-rack-v2.rb"
server: "puma"
endpoint: "http://localhost:9292"
- ruby: "3.4"
name: "Puma-v6-Rack-v3-http"
gemfile: "gems/puma-v6-rack-v3.rb"
server: "puma"
endpoint: "http://localhost:9292"
- ruby: "3.4"
name: "Puma-head-Rack-v2-http"
gemfile: "gems/puma-head-rack-v2.rb"
server: "puma"
endpoint: "http://localhost:9292"
- ruby: "3.4"
name: "Puma-head-Rack-v3-http"
gemfile: "gems/puma-head-rack-v3.rb"
server: "puma"
endpoint: "http://localhost:9292"
- ruby: "3.4"
name: "Thin-v1-Rack-v2-http"
gemfile: "gems/thin-v1-rack-v2.rb"
server: "thin start"
endpoint: "http://localhost:3000"
- ruby: "3.4"
name: "Unicorn-v6-Rack-v2-http"
gemfile: "gems/unicorn-v6-rack-v2.rb"
server: "unicorn -E none"
endpoint: "http://localhost:8080"
- ruby: "3.4"
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"