Skip to content

Commit 761545b

Browse files
clokevalscionencounter
authored
Github Actions To Replace Travis (#140)
* Add action. Update bundle and rake * Skip bumping bundler and rake dependency * Add gem file matrix to load rails version * Add back ruby versions to matrix * Change first ruby to 2.4 * Specify bundler version * Starting with newer rails and ruby * Update ruby.yml * Revert bundle change * Add another rails version * Take ruby 3 out of the mix for this try * Attempt to continue on error * Run on all branches, full test matrix * Fix Rails 4.2 / Ruby 2.3 runs * Add Ruby 3.0 * Allow bundler 2.x * Add bundler-version 2.1.4 to matrix * Remove bundler-version 2.1.4 from matrix * Add branch filter back to push Co-authored-by: Vesa Laakso <vesa.laakso@venuu.fi> Co-authored-by: Luke Street <luke.street@encounterpc.com>
1 parent 3251c65 commit 761545b

File tree

2 files changed

+62
-1
lines changed

2 files changed

+62
-1
lines changed

.github/workflows/ruby.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7+
8+
name: Ruby
9+
10+
on:
11+
push:
12+
branches: [ master ]
13+
pull_request:
14+
branches: [ master ]
15+
16+
jobs:
17+
test:
18+
runs-on: ubuntu-20.04
19+
strategy:
20+
matrix:
21+
gemfile:
22+
- rails_5_0_pundit_1
23+
- rails_5_0_pundit_2
24+
- rails_5_1_pundit_1
25+
- rails_5_1_pundit_2
26+
- rails_5_2_pundit_1
27+
- rails_5_2_pundit_2
28+
- rails_6_0_pundit_1
29+
- rails_6_0_pundit_2
30+
ruby-version: [ '2.5', '2.7' ]
31+
bundler-version: [ '1.11' ]
32+
include:
33+
# Include Rails 4.2 / Ruby 2.3 combo
34+
- gemfile: rails_4_2_pundit_1
35+
ruby-version: '2.3'
36+
bundler-version: '1.11'
37+
- gemfile: rails_4_2_pundit_2
38+
ruby-version: '2.3'
39+
bundler-version: '1.11'
40+
# Include Rails 6.0 / Ruby 3.0 combo
41+
- gemfile: rails_6_0_pundit_1
42+
ruby-version: '3.0'
43+
bundler-version: '2.1.4'
44+
- gemfile: rails_6_0_pundit_2
45+
ruby-version: '3.0'
46+
bundler-version: '2.1.4'
47+
continue-on-error: true
48+
env:
49+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
50+
steps:
51+
- uses: actions/checkout@v2
52+
- name: Set up Ruby
53+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
54+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
55+
uses: ruby/setup-ruby@v1
56+
with:
57+
bundler: ${{ matrix.bundler-version }}
58+
ruby-version: ${{ matrix.ruby-version }}
59+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
60+
- name: Run tests
61+
run: bundle exec rake

jsonapi-authorization.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
2121
spec.add_dependency "pundit", ">= 1.0.0", "< 3.0.0"
2222

2323
spec.add_development_dependency "appraisal"
24-
spec.add_development_dependency "bundler", "~> 1.11"
24+
spec.add_development_dependency "bundler", ">= 1.11"
2525
spec.add_development_dependency "rake", "~> 12.0"
2626
spec.add_development_dependency "rspec", "~> 3.8"
2727
spec.add_development_dependency "rspec-rails", "~> 3.8"

0 commit comments

Comments
 (0)