mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
0b737cce42
* Support skip_on :truffleruby * Remove unused variable declaration * Properly skip tests which need fork * Improve NO_FORK_MSG * Keep the Tempfile instances alive in test_redirect_io.rb * Otherwise they could GC in the middle of the test, and the files could then be deleted. * Use a better way to find a free port * Read directly from the socket in #read_and_drop * There is no point to decode the bytes since we are closing the socket in Puma::MiniSSL::Socket#close. * Also, calling #engine_read_all might cause further SSL errors, which could hide the first SSL error. This notably happens in TestPumaServerSSLClient#test_verify_fail_if_no_client_cert if the server is faster than the client. The error in that case is "System error: Success - 0 (Puma::MiniSSL::SSLError)" which is not actually an error, but there is also nothing to read further from SSL. * TruffleRuby should pass the CI now, remove from allowed failures * Use a timeout of 120 for all non-MRI implementations * 60 doesn't seem enough in CI for TestThreadPool#test_trim on TruffleRuby. * Fix check for cluster mode in integration tests * Improve integration tests to fail more clearly if the pid file does not exist * Make integration tests more robust * Add skips for unreliable or racy tests * Add ChangeLog entry * No need to run RuboCop on non-MRI implementations * This should speed up CI a bit for those jobs.
136 lines
3.3 KiB
YAML
136 lines
3.3 KiB
YAML
name: Puma
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
name: >-
|
|
${{ matrix.os }}, ${{ matrix.ruby }}
|
|
env:
|
|
CI: true
|
|
TESTOPTS: -v
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
if: |
|
|
!(contains(github.event.pull_request.title, '[ci skip]')
|
|
|| contains(github.event.head_commit.message, '[ci skip]'))
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ ubuntu-18.04, macos ]
|
|
ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, head, jruby, truffleruby-head ]
|
|
|
|
steps:
|
|
- name: repo checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: load ruby, ragel
|
|
uses: MSP-Greg/setup-ruby-pkgs@v1
|
|
with:
|
|
ruby-version: ${{ matrix.ruby }}
|
|
apt-get: ragel
|
|
brew: ragel
|
|
|
|
- name: bundle install
|
|
run: |
|
|
# update RubyGems in Ruby 2.2, bundle install
|
|
if [[ "${{ matrix.ruby }}" < "2.3" ]]; then
|
|
gem update --system 2.7.10 --no-document
|
|
fi
|
|
bundle install --jobs 4 --retry 3 --path=.bundle/puma
|
|
|
|
- name: compile
|
|
run: bundle exec rake compile
|
|
|
|
- name: rubocop
|
|
if: startsWith(matrix.ruby, '2.')
|
|
run: bundle exec rake rubocop
|
|
|
|
- name: test
|
|
timeout-minutes: 8
|
|
run: bundle exec rake test:all
|
|
|
|
win32:
|
|
name: >-
|
|
${{ matrix.os }}, ${{ matrix.ruby }}
|
|
env:
|
|
CI: true
|
|
TESTOPTS: -v
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
if: |
|
|
!(contains(github.event.pull_request.title, '[ci skip]')
|
|
|| contains(github.event.head_commit.message, '[ci skip]'))
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ windows-latest ]
|
|
ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, mingw ]
|
|
|
|
steps:
|
|
- name: repo checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: load ruby, ragel, openssl
|
|
uses: MSP-Greg/setup-ruby-pkgs@v1
|
|
with:
|
|
ruby-version: ${{ matrix.ruby }}
|
|
mingw: _upgrade_ openssl ragel
|
|
|
|
- name: bundle install
|
|
run: |
|
|
# update RubyGems in Ruby 2.2, bundle install
|
|
if ('${{ matrix.ruby }}' -lt '2.3') {
|
|
gem update --system 2.7.10 --no-document
|
|
}
|
|
bundle install --jobs 4 --retry 3 --path=.bundle/puma
|
|
|
|
- name: compile
|
|
run: |
|
|
bundle exec rake compile
|
|
|
|
- name: test
|
|
timeout-minutes: 8
|
|
run: bundle exec rake
|
|
|
|
allowedFailures:
|
|
name: >-
|
|
${{ matrix.cfg.os }}, ${{ matrix.cfg.ruby }}
|
|
env:
|
|
CI: true
|
|
TESTOPTS: -v
|
|
|
|
runs-on: ${{ matrix.cfg.os }}
|
|
if: |
|
|
!(contains(github.event.pull_request.title, '[ci skip]')
|
|
|| contains(github.event.head_commit.message, '[ci skip]'))
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
cfg:
|
|
- { os: ubuntu-latest, ruby: jruby-head }
|
|
|
|
steps:
|
|
- name: repo checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: load ruby, ragel
|
|
uses: MSP-Greg/setup-ruby-pkgs@v1
|
|
with:
|
|
ruby-version: ${{ matrix.cfg.ruby }}
|
|
apt-get: ragel
|
|
brew: ragel
|
|
|
|
- name: bundle install
|
|
run: |
|
|
bundle install --jobs 4 --retry 3 --path=.bundle/puma
|
|
|
|
- name: compile
|
|
continue-on-error: true
|
|
run: bundle exec rake compile
|
|
|
|
- name: test
|
|
timeout-minutes: 8
|
|
continue-on-error: true
|
|
if: success()
|
|
run: bundle exec rake
|