-
Notifications
You must be signed in to change notification settings - Fork 127
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
Use RSpec and GitHub Actions #149
base: master
Are you sure you want to change the base?
Conversation
smtp.enable_starttls if settings[:enable_starttls_auto] | ||
openssl_verify_mode = settings[:openssl_verify_mode] | ||
|
||
if openssl_verify_mode.kind_of?(String) | ||
openssl_verify_mode = OpenSSL::SSL.const_get("VERIFY_#{openssl_verify_mode.upcase}") | ||
end | ||
|
||
ssl_context = Net::SMTP.default_ssl_context | ||
ssl_context.verify_mode = openssl_verify_mode if openssl_verify_mode | ||
smtp.enable_starttls(ssl_context) if settings[:enable_starttls_auto] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, the test environment has been configured to allow specifying OpenSSL::SSL::VERIFY_NONE to avoid errors caused by SSL certificates generated by fake_smtp_server.rb.
Fix Purple-Devs#138 As of 2024, [using Travis CI to build OSS requires contacting them to request a monthly allocation of credits](https://docs.travis-ci.com/user/billing-faq/#what-if-i-am-building-open-source), making the process more cumbersome. To simplify this, I migrated from Travis CI to GitHub Actions. I converted the [test coverage previously created with shell scripts](https://github.com/Purple-Devs/health_check/blob/53ae042bf0cc69b1d8d7b1b47e2296303b0a591c/test/test_with_railsapp) to RSpec's Request Spec. Health checks for services like s3 and sidekiq were not included in the original tests, so they are not part of this commit. Additionally, redundant development gems and configuration for the test application that seemed unnecessary were removed to avoid noise. I created a test matrix covering Ruby versions 2.4 to 3.3 and Rails versions 5.1 to 7.2, ensuring all tests pass. You can also run the tests locally as follows: ```ruby export BUNDLE_GEMFILE=test/rails_7.1.gemfile bundle install bundle exec rake ```
d00b366
to
1568521
Compare
Hi @jmarchello, I understand you might be quite busy, but whenever you have some time, could you please review this PR? Your input would be really valuable. Thanks so much! |
Fix #138
As of 2024, using Travis CI to build OSS requires contacting them to request a monthly allocation of credits, making the process more cumbersome. To simplify this, I migrated from Travis CI to GitHub Actions.
I converted the test coverage previously created with shell scripts to RSpec's Request Spec. Health checks for services like s3 and sidekiq were not included in the original tests, so they are not part of this commit. Additionally, redundant development gems and configuration for the test application that seemed unnecessary were removed to avoid noise.
I created a test matrix covering Ruby versions 2.4 to 3.3 and Rails versions 5.1 to 7.2, ensuring all tests pass.
You can also run the tests locally as follows:
Test result: Use RSpec and GitHub Actions · willnet/health_check@d00b366