Skip to content

Commit

Permalink
Stop using Travis CI and switch to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
willnet committed Aug 1, 2024
1 parent 53ae042 commit ede19db
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 290 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI
on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- { ruby: '2.2', gemfile: test/rails_5.0.gemfile, middleware: no }
- { ruby: '2.3', gemfile: test/rails_5.0.gemfile, middleware: no }
- { ruby: '2.2', gemfile: test/rails_5.0.gemfile, middleware: yes }
- { ruby: '2.3', gemfile: test/rails_5.0.gemfile, middleware: yes }
- { ruby: '2.2', gemfile: test/rails_5.1.gemfile, middleware: no }
- { ruby: '2.3', gemfile: test/rails_5.1.gemfile, middleware: no }
- { ruby: '2.4', gemfile: test/rails_5.1.gemfile, middleware: no }
- { ruby: '2.2', gemfile: test/rails_5.1.gemfile, middleware: yes }
- { ruby: '2.3', gemfile: test/rails_5.1.gemfile, middleware: yes }
- { ruby: '2.4', gemfile: test/rails_5.1.gemfile, middleware: yes }
- { ruby: '2.5', gemfile: test/rails_6.0.gemfile, middleware: yes }
- { ruby: '2.6', gemfile: test/rails_6.0.gemfile, middleware: yes }
- { ruby: '2.5', gemfile: test/rails_6.1.gemfile, middleware: yes }
- { ruby: '2.6', gemfile: test/rails_6.1.gemfile, middleware: yes }
- { ruby: '2.7', gemfile: test/rails_6.1.gemfile, middleware: yes }
- { ruby: '3.0', gemfile: test/rails_6.1.gemfile, middleware: yes }
- { ruby: '2.7', gemfile: test/rails_7.0.gemfile, middleware: yes }
- { ruby: '3.0', gemfile: test/rails_7.0.gemfile, middleware: yes }
- { ruby: '3.1', gemfile: test/rails_7.0.gemfile, middleware: yes }
- { ruby: '2.7', gemfile: test/rails_7.1.gemfile, middleware: yes }
- { ruby: '3.0', gemfile: test/rails_7.1.gemfile, middleware: yes }
- { ruby: '3.1', gemfile: test/rails_7.1.gemfile, middleware: yes }
- { ruby: '3.2', gemfile: test/rails_7.1.gemfile, middleware: yes }
- { ruby: '3.3', gemfile: test/rails_7.1.gemfile, middleware: yes }

steps:
- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run tests
env:
MIDDLEWARE: ${{ matrix.middleware }}
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
run: ./test/test_with_railsapp
218 changes: 0 additions & 218 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ group :development, :test do
else
gem 'sqlite3', '~> 1.3.7'
end
# run travis-lint to check .travis.yml
gem 'travis-lint'

# mime-types 2.0 requires Ruby version >= 1.9.2
# mime-types 3.0 requires Ruby version >= 2.0
gem 'mime-types', defined?(JRUBY_VERSION) || RUBY_VERSION < '2.0' ? '< 3' : '>= 3.0'
Expand Down
5 changes: 2 additions & 3 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ To change the configuration of health_check, create a file `config/initializers/
config.on_failure do |checks, msg|
# log msg somewhere
end

config.on_success do |checks|
# flag that everything is well
end


end

Expand Down Expand Up @@ -292,7 +292,6 @@ Last-modified is set to the current time (rounded down to a multiple of max_age
=== Automated testing and other checks

* {<img src="https://badge.fury.io/rb/health_check.svg" alt="Gem Version" />}[http://badge.fury.io/rb/health_check] - Latest Gem
* {<img src="https://travis-ci.org/ianheggie/health_check.svg">}[https://travis-ci.org/ianheggie/health_check] - Travis CI
* {<img src="https://codeclimate.com/github/ianheggie/health_check.svg" />}[https://codeclimate.com/github/ianheggie/health_check] - Code quality
* {<img src="https://gemnasium.com/ianheggie/health_check.svg">}[https://gemnasium.com/ianheggie/health_check] - Gem dependencies

Expand Down
30 changes: 0 additions & 30 deletions test/rails_6.2.gemfile

This file was deleted.

26 changes: 26 additions & 0 deletions test/rails_7.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Gemfile for health_test testing

source 'https://rubygems.org'

gem 'rails', '~> 7.0.0'

group :development, :test do
if defined?(JRUBY_VERSION)
gem 'jruby-openssl'
gem 'activerecord-jdbcsqlite3-adapter'
else
gem 'sqlite3', "~> 1.4"
end
gem 'shoulda'
end

# redis based checks
gem 'sidekiq', require: !ENV['SIDEKIQ'].nil? # REQUIRED
gem 'redis', require: !ENV['REDIS_URL'].nil? # REQUIRED
gem 'resque', require: !ENV['RESQUE'].nil? # REQUIRED
gem 'elasticsearch', require: !ENV['ELASTICSEARCH_URL'].nil? # REQUIRED
# s3 check
gem 'aws-sdk-s3', require: !ENV['AWS_ACCESS_KEY_ID'].nil? # REQUIRED

gem 'rexml' # REQUIRED for ruby >= 3.0
gem 'webrick' # REQUIRED for ruby >= 3.0
26 changes: 26 additions & 0 deletions test/rails_7.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Gemfile for health_test testing

source 'https://rubygems.org'

gem 'rails', '~> 7.1.0'

group :development, :test do
if defined?(JRUBY_VERSION)
gem 'jruby-openssl'
gem 'activerecord-jdbcsqlite3-adapter'
else
gem 'sqlite3', "~> 1.4"
end
gem 'shoulda'
end

# redis based checks
gem 'sidekiq', require: !ENV['SIDEKIQ'].nil? # REQUIRED
gem 'redis', require: !ENV['REDIS_URL'].nil? # REQUIRED
gem 'resque', require: !ENV['RESQUE'].nil? # REQUIRED
gem 'elasticsearch', require: !ENV['ELASTICSEARCH_URL'].nil? # REQUIRED
# s3 check
gem 'aws-sdk-s3', require: !ENV['AWS_ACCESS_KEY_ID'].nil? # REQUIRED

gem 'rexml' # REQUIRED for ruby >= 3.0
gem 'webrick' # REQUIRED for ruby >= 3.0
Loading

0 comments on commit ede19db

Please sign in to comment.