-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests and CI #375
Add tests and CI #375
Conversation
Deploying with Capistrano and systemd can be difficult to verify manually, so I automated the verification using tests and CI. I used a Debian Docker image to create a container running systemd, and deployed a small Sinatra application to confirm it works. With mostly default settings, I confirmed that the four tasks puma:install, deploy, puma:stop, and puma:start work as expected. It would be good to also verify other tasks and the nginx configuration, but for now, this provides the minimum necessary verification.
``` #<Thread:0x000000012a5d7570 /Users/willnet/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/sshkit-1.22.2/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true): /Users/willnet/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/sshkit-1.22.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as willnet@localhost: Exception while executing as willnet@localhost: loginctl exit status: 1 (SSHKit::Runner::ExecuteError) loginctl stdout: Nothing written loginctl stderr: Could not enable linger: Access denied from /Users/willnet/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/sshkit-1.22.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute' /Users/willnet/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/sshkit-1.22.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as willnet@localhost: loginctl exit status: 1 (SSHKit::Runner::ExecuteError) loginctl stdout: Nothing written loginctl stderr: Could not enable linger: Access denied from /Users/willnet/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/sshkit-1.22.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute' /Users/willnet/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/sshkit-1.22.2/lib/sshkit/command.rb:97:in `exit_status=': loginctl exit status: 1 (SSHKit::Command::Failed) loginctl stdout: Nothing written loginctl stderr: Could not enable linger: Access denied ```
Fix an issue where the argument passing method for ERB.new in Ruby 2.5 differs from Ruby 2.6 and above, causing errors during template generation. ``` SSHKit::Runner::ExecuteError: Exception while executing as willnet@localhost: no implicit conversion of Hash into Integer ``` ref: https://ruby-doc.org/stdlib-2.5.0/libdoc/erb/rdoc/ERB.html#method-c-new
I didn't. I will release all this week. Thanks for the ping @climatebrad |
@seuros Looking forward to the release! |
The tests corresponding to this PR failed because the branch used to retrieve the test application was set to master. Once this PR is merged, the tests should pass. You can see that the error occurs while running |
I installed github mobile recently and started to get notifications now. Previously emails digest will show only if I was referenced. |
Deploying with Capistrano and systemd can be difficult to verify manually, so I automated the verification using tests and CI. I used a Debian Docker image to create a container running systemd, and deployed a small Sinatra application to confirm it works.
With mostly default settings, I confirmed that the four tasks
puma:install
,deploy
,puma:stop
, andpuma:start
work as expected. It would be good to also verify other tasks and the nginx configuration, but for now, this provides the minimum necessary verification.Running the tests revealed two issues, which I was able to fix. For details, please refer to the descriptions of each commit.
All tests from Ruby 2.5 to 3.3 have passed, as shown in the following link:
Fix ci on Ruby 2.5 · willnet/capistrano-puma@9a83087
Ideally, this PR should be merged and version 6.0.0 released. However, if there is no response, I will consider releasing a forked gem.