Skip to content
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 Github Actions for CI #489

Merged
merged 14 commits into from
Nov 4, 2020
Merged
127 changes: 127 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- 2.7
# - ruby-head
# - truffleruby-head
gemfile:
# These are located in the gemfiles/ folder
- rails42
- rails50
- rails51
- rails52
- rails60
- rails42_haml
- rails50_haml
- rails51_haml
- rails52_haml
- rails60_haml
- rails42_boc
- rails50_boc
- rails51_boc
- rails52_boc
- rails60_boc
- rack
- rack_boc
# - pry09
# - pry10
# - pry11
exclude:
- { ruby: 2.2, gemfile: rails60 }
- { ruby: 2.2, gemfile: rails60_boc }
- { ruby: 2.2, gemfile: rails60_haml }
- { ruby: 2.3, gemfile: rails42 }
- { ruby: 2.3, gemfile: rails42_boc }
- { ruby: 2.3, gemfile: rails42_haml }
- { ruby: 2.3, gemfile: rails60 }
- { ruby: 2.3, gemfile: rails60_boc }
- { ruby: 2.3, gemfile: rails60_haml }
- { ruby: 2.4, gemfile: rails42 }
- { ruby: 2.4, gemfile: rails42_boc }
- { ruby: 2.4, gemfile: rails42_haml }
- { ruby: 2.4, gemfile: rails60 }
- { ruby: 2.4, gemfile: rails60_boc }
- { ruby: 2.4, gemfile: rails60_haml }
- { ruby: 2.5, gemfile: rails42 }
- { ruby: 2.5, gemfile: rails42_boc }
- { ruby: 2.5, gemfile: rails42_haml }
- { ruby: 2.6, gemfile: rails42 }
- { ruby: 2.6, gemfile: rails42_boc }
- { ruby: 2.6, gemfile: rails42_haml }
- { ruby: 2.7, gemfile: rails42 }
- { ruby: 2.7, gemfile: rails42_boc }
- { ruby: 2.7, gemfile: rails42_haml }
# - { ruby: ruby-head, gemfile: rails42 }
# - { ruby: ruby-head, gemfile: rails42_boc }
# - { ruby: ruby-head, gemfile: rails42_haml }
- { ruby: truffleruby-head, gemfile: rails42_boc }
- { ruby: truffleruby-head, gemfile: rails50_boc }
- { ruby: truffleruby-head, gemfile: rails51_boc }
- { ruby: truffleruby-head, gemfile: rails52_boc }
- { ruby: truffleruby-head, gemfile: rails60_boc }
- { ruby: truffleruby-head, gemfile: rack_boc }

steps:

- uses: actions/checkout@v2

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

- uses: actions/cache@v2
with:
path: gemfiles/vendor/bundle
key: v3-${{ runner.os }}-branch-${{ github.ref }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}-${{ hashFiles(format('gemfiles/{0}.gemfile', matrix.gemfile)) }}
restore-keys: |
v3-${{ runner.os }}-branch-${{ github.ref }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}
v3-${{ runner.os }}-branch-master-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}

- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

- name: RSpec
run: bundle exec rspec -f doc --color
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

- name: Report to Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.github_token }}
flag-name: test-${{ matrix.ruby }}-${{ matrix.gemfile }}
parallel: true


finish:
needs: test
runs-on: ubuntu-latest
steps:

- name: Report completion to Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
111 changes: 0 additions & 111 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion gemfiles/pry010.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0'
gem "binding_of_caller"
gem "pry", "~> 0.10.0"

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/pry011.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source "https://rubygems.org"
gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0'
gem "pry", "~> 0.11.0pre"

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/pry09.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source "https://rubygems.org"
gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0'
gem "pry", "~> 0.9.12"

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rack.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ source "https://rubygems.org"

gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0'

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rack_boc.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source "https://rubygems.org"
gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0'
gem "binding_of_caller"

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails42.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gem "rails", "~> 4.2.0"
gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails42_boc.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
gem "binding_of_caller"

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails42_haml.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
gem "haml"

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails50.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source "https://rubygems.org"
gem "rails", "~> 5.0.0"
gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails50_boc.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gem "rails", "~> 5.0.0"
gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
gem "binding_of_caller"

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails50_haml.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gem "rails", "~> 5.0.0"
gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
gem "haml"

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails51.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source "https://rubygems.org"
gem "rails", "~> 5.1.0"
gem 'i18n', '< 1.5.2', require: false if RUBY_VERSION < '2.3'

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails51_boc.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gem "rails", "~> 5.1.0"
gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
gem "binding_of_caller"

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails51_haml.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gem "rails", "~> 5.1.0"
gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
gem "haml"

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails52.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source "https://rubygems.org"
gem "rails", "~> 5.2.0"
gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails52_boc.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gem "rails", "~> 5.2.0"
gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
gem "binding_of_caller"

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails52_haml.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gem "rails", "~> 5.2.0"
gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
gem "haml"

gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

gemspec path: "../"
Loading