forked from Purple-Devs/health_check
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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:
- Loading branch information
Showing
49 changed files
with
579 additions
and
2,120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: CI | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- { ruby: '2.2', gemfile: './gemfiles/rails_5.0.gemfile', middleware: 'true' } | ||
- { ruby: '2.2', gemfile: './gemfiles/rails_5.0.gemfile', middleware: 'false' } | ||
- { ruby: '2.3', gemfile: './gemfiles/rails_5.0.gemfile', middleware: 'true' } | ||
- { ruby: '2.3', gemfile: './gemfiles/rails_5.0.gemfile', middleware: 'false' } | ||
- { ruby: '2.2', gemfile: './gemfiles/rails_5.1.gemfile', middleware: 'true' } | ||
- { ruby: '2.2', gemfile: './gemfiles/rails_5.1.gemfile', middleware: 'false' } | ||
- { ruby: '2.3', gemfile: './gemfiles/rails_5.1.gemfile', middleware: 'true' } | ||
- { ruby: '2.3', gemfile: './gemfiles/rails_5.1.gemfile', middleware: 'false' } | ||
- { ruby: '2.4', gemfile: './gemfiles/rails_5.1.gemfile', middleware: 'true' } | ||
- { ruby: '2.4', gemfile: './gemfiles/rails_5.1.gemfile', middleware: 'false' } | ||
- { ruby: '2.5', gemfile: './gemfiles/rails_6.0.gemfile', middleware: 'true' } | ||
- { ruby: '2.5', gemfile: './gemfiles/rails_6.0.gemfile', middleware: 'false' } | ||
- { ruby: '2.6', gemfile: './gemfiles/rails_6.0.gemfile', middleware: 'true' } | ||
- { ruby: '2.6', gemfile: './gemfiles/rails_6.0.gemfile', middleware: 'false' } | ||
- { ruby: '2.5', gemfile: './gemfiles/rails_6.1.gemfile', middleware: 'true' } | ||
- { ruby: '2.5', gemfile: './gemfiles/rails_6.1.gemfile', middleware: 'false' } | ||
- { ruby: '2.6', gemfile: './gemfiles/rails_6.1.gemfile', middleware: 'true' } | ||
- { ruby: '2.6', gemfile: './gemfiles/rails_6.1.gemfile', middleware: 'false' } | ||
- { ruby: '2.7', gemfile: './gemfiles/rails_6.1.gemfile', middleware: 'true' } | ||
- { ruby: '2.7', gemfile: './gemfiles/rails_6.1.gemfile', middleware: 'false' } | ||
- { ruby: '3.0', gemfile: './gemfiles/rails_6.1.gemfile', middleware: 'true' } | ||
- { ruby: '3.0', gemfile: './gemfiles/rails_6.1.gemfile', middleware: 'false' } | ||
- { ruby: '2.7', gemfile: './gemfiles/rails_7.0.gemfile', middleware: 'true' } | ||
- { ruby: '2.7', gemfile: './gemfiles/rails_7.0.gemfile', middleware: 'false' } | ||
- { ruby: '3.0', gemfile: './gemfiles/rails_7.0.gemfile', middleware: 'true' } | ||
- { ruby: '3.0', gemfile: './gemfiles/rails_7.0.gemfile', middleware: 'false' } | ||
- { ruby: '3.1', gemfile: './gemfiles/rails_7.0.gemfile', middleware: 'true' } | ||
- { ruby: '3.1', gemfile: './gemfiles/rails_7.0.gemfile', middleware: 'false' } | ||
- { ruby: '2.7', gemfile: './gemfiles/rails_7.1.gemfile', middleware: 'true' } | ||
- { ruby: '2.7', gemfile: './gemfiles/rails_7.1.gemfile', middleware: 'false' } | ||
- { ruby: '3.0', gemfile: './gemfiles/rails_7.1.gemfile', middleware: 'true' } | ||
- { ruby: '3.0', gemfile: './gemfiles/rails_7.1.gemfile', middleware: 'false' } | ||
- { ruby: '3.1', gemfile: './gemfiles/rails_7.1.gemfile', middleware: 'true' } | ||
- { ruby: '3.1', gemfile: './gemfiles/rails_7.1.gemfile', middleware: 'false' } | ||
- { ruby: '3.2', gemfile: './gemfiles/rails_7.1.gemfile', middleware: 'true' } | ||
- { ruby: '3.2', gemfile: './gemfiles/rails_7.1.gemfile', middleware: 'false' } | ||
- { ruby: '3.3', gemfile: './gemfiles/rails_7.1.gemfile', middleware: 'true' } | ||
- { ruby: '3.3', gemfile: './gemfiles/rails_7.1.gemfile', middleware: 'false' } | ||
- { ruby: '3.1', gemfile: './gemfiles/rails_7.2.gemfile', middleware: 'true' } | ||
- { ruby: '3.1', gemfile: './gemfiles/rails_7.2.gemfile', middleware: 'false' } | ||
- { ruby: '3.2', gemfile: './gemfiles/rails_7.2.gemfile', middleware: 'true' } | ||
- { ruby: '3.2', gemfile: './gemfiles/rails_7.2.gemfile', middleware: 'false' } | ||
- { ruby: '3.3', gemfile: './gemfiles/rails_7.2.gemfile', middleware: 'true' } | ||
- { ruby: '3.3', gemfile: './gemfiles/rails_7.2.gemfile', middleware: 'false' } | ||
env: | ||
BUNDLE_GEMFILE: ${{ matrix.gemfile }} | ||
MIDDLEWARE: ${{ matrix.middleware }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
|
||
- name: Run tests | ||
run: bundle exec rake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--require spec_helper |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.