Skip to content

[ci skip] Indicate that wait_for_less_busy_worker is enabled by default in DSL docs #163

[ci skip] Indicate that wait_for_less_busy_worker is enabled by default in DSL docs

[ci skip] Indicate that wait_for_less_busy_worker is enabled by default in DSL docs #163

Workflow file for this run

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: >-
MRI: ${{ 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
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, macos-11, macos-12, macos-13, 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: macos-11 , ruby: 2.5 }
- { os: macos-11 , ruby: 2.6 }
- { os: macos-11 , ruby: '3.0' }
- { os: macos-11 , ruby: 3.1 }
- { os: macos-11 , ruby: head }
- { os: macos-13 , ruby: 2.5 }
- { os: macos-13 , ruby: 2.6 }
- { os: macos-13 , ruby: '3.0' }
- { os: macos-13 , ruby: 3.1 }
- { os: macos-13 , ruby: 2.6 }
- { os: macos-13 , ruby: head }
- { 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: 6
run: test/runner --verbose
test_non_mri:
name: >-
NON-MRI: ${{ 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
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-12 , ruby: jruby }
- { tto: 8 , os: macos-12 , ruby: truffleruby, allow-failure: true }
steps:
- name: repo checkout
if: ${{ needs.skip_duplicate_runs.outputs.should_skip != 'true' }}
uses: actions/checkout@v4
- name: set JAVA_HOME to JDK 17
if: (needs.skip_duplicate_runs.outputs.should_skip != 'true')
run: echo JAVA_HOME=$JAVA_HOME_17_X64 >> $GITHUB_ENV
- 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