mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Appveyor CI (#1374)
* appveyour config * proper platforms for windows * disabling tests with ssl and interrupts * excessive ssl setup * fixed message * adding info in readme regarding stopgap_13632 * formatting * trailing spaces
This commit is contained in:
parent
91416134cb
commit
a31a62656d
7 changed files with 60 additions and 1 deletions
2
Gemfile
2
Gemfile
|
@ -16,5 +16,5 @@ gem "jruby-openssl", :platform => "jruby"
|
|||
gem "rubocop", "~> 0.49.1"
|
||||
|
||||
if %w(2.2.7 2.3.4 2.4.1).include? RUBY_VERSION
|
||||
gem "stopgap_13632", "~> 1.0", :platform => "mri"
|
||||
gem "stopgap_13632", "~> 1.0", :platforms => ["mri", "mingw", "x64_mingw"]
|
||||
end
|
||||
|
|
23
README.md
23
README.md
|
@ -311,6 +311,29 @@ reliability in production environments:
|
|||
* [tools/jungle](https://github.com/puma/puma/tree/master/tools/jungle) for sysvinit (init.d) and upstart
|
||||
* [docs/systemd](https://github.com/puma/puma/blob/master/docs/systemd.md)
|
||||
|
||||
## Known bugs
|
||||
For MRI versions 2.2.7, 2.3.4 and 2.4.1 you may start erratically get the following exception in places where it should not happen:
|
||||
```ruby
|
||||
stream closed in another thread (IOError)
|
||||
```
|
||||
If that's the case then it might be caused by ruby bug https://bugs.ruby-lang.org/issues/13632 and it could be temporary fixed with the gem https://rubygems.org/gems/stopgap_13632.
|
||||
Add to gemfile:
|
||||
```
|
||||
if %w(2.2.7 2.3.4 2.4.1).include? RUBY_VERSION
|
||||
gem "stopgap_13632", "~> 1.0", :platforms => ["mri", "mingw", "x64_mingw"]
|
||||
end
|
||||
```
|
||||
Don't forget to require it:
|
||||
```
|
||||
require 'stopgap_13632'
|
||||
```
|
||||
And when an "IOError: stream closed" happens in a thread, accessing a busy IO, catch it and call the following method:
|
||||
```
|
||||
rescue IOError
|
||||
Thread.current.purge_interrupt_queue
|
||||
end
|
||||
```
|
||||
|
||||
## Capistrano deployment
|
||||
|
||||
Puma has support for Capistrano3 with an [external gem](https://github.com/seuros/capistrano-puma), you just need require that in Gemfile:
|
||||
|
|
29
appveyor.yml
Normal file
29
appveyor.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
install:
|
||||
- set PATH=C:\MinGW\bin;C:\Ruby%ruby_version%\bin;%PATH%
|
||||
- set RAKEOPT=-rdevkit
|
||||
- set DISABLE_SSL=true
|
||||
- set APPVEYOR=true
|
||||
- ruby --version
|
||||
- gem --version
|
||||
- bundle --version
|
||||
- bundle install
|
||||
|
||||
test_script:
|
||||
- bundle exec rake
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- ruby_version: "24"
|
||||
- ruby_version: "24-x64"
|
||||
- ruby_version: "23"
|
||||
- ruby_version: "23-x64"
|
||||
- ruby_version: "22"
|
||||
- ruby_version: "22-x64"
|
||||
- ruby_version: "21"
|
||||
- ruby_version: "21-x64"
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
build: off
|
|
@ -57,6 +57,10 @@ module SkipTestsBasedOnRubyEngine
|
|||
def skip_on_jruby
|
||||
skip "Skipped on JRuby" if Puma.jruby?
|
||||
end
|
||||
|
||||
def skip_on_appveyor
|
||||
skip "Skipped on Appveyor" if ENV["APPVEYOR"]
|
||||
end
|
||||
end
|
||||
|
||||
Minitest::Test.include SkipTestsBasedOnRubyEngine
|
||||
|
|
|
@ -19,6 +19,7 @@ class TestBinder < Minitest::Test
|
|||
end
|
||||
|
||||
def test_localhost_addresses_dont_alter_listeners_for_ssl_addresses
|
||||
skip_on_appveyor
|
||||
skip_on_jruby
|
||||
|
||||
key = File.expand_path "../../examples/puma/puma_keypair.pem", __FILE__
|
||||
|
|
|
@ -54,6 +54,7 @@ class TestIntegration < Minitest::Test
|
|||
end
|
||||
|
||||
def restart_server_and_listen(argv)
|
||||
skip_on_appveyor
|
||||
server(argv)
|
||||
s = connect
|
||||
initial_reply = read_body(s)
|
||||
|
|
|
@ -48,6 +48,7 @@ class TestPathHandler < Minitest::Test
|
|||
|
||||
|
||||
def test_handler_boots
|
||||
skip_on_appveyor
|
||||
in_handler(app) do |launcher|
|
||||
hit(["http://0.0.0.0:#{ launcher.connected_port }/test"])
|
||||
assert_equal("/test", @input["PATH_INFO"])
|
||||
|
|
Loading…
Reference in a new issue