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

Setup build matrix in CI #116

Merged
merged 6 commits into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 27 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,44 @@
version: 2.1
matrix_rubyversions: &matrix_rubyversions
matrix:
parameters:
rubyversion: ["2.5", "2.6", "2.7", "3.0"]
# Default version of ruby to use for lint and publishing
default_rubyversion: &default_rubyversion "2.7"

executors:
ruby:
parameters:
rubyversion:
type: string
default: *default_rubyversion
docker:
- image: circleci/ruby:<< parameters.rubyversion >>

jobs:
run-tests:
docker:
- image: circleci/ruby:2.5.7-buster
parameters:
rubyversion:
type: string
default: *default_rubyversion
executor:
name: ruby
rubyversion: "<< parameters.rubyversion >>"
steps:
- checkout
- restore_cache:
keys:
- gems-v2-{{ checksum "Gemfile.lock" }}
- gems-v2-{{ checksum "Gemfile" }}
- gems-v2-
- run: bundle check || bundle install
- save_cache:
key: gems-v2--{{ checksum "Gemfile.lock" }}
key: gems-v2--{{ checksum "Gemfile" }}
paths:
- vendor/bundle
- run: bundle exec rake spec

workflows:
tests:
jobs:
- run-tests
- run-tests:
<<: *matrix_rubyversions
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ tmp/
## Environment normalization:
/.bundle
/vendor/bundle

Gemfile.lock
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ end

group :test do
gem 'guard-rspec', require: false
gem 'listen', '~> 3.1.5'
gem 'listen', '~> 3'
gem 'rack-test'
gem 'rspec', '~> 3.5'
gem 'codecov', require: false
Expand Down
167 changes: 0 additions & 167 deletions Gemfile.lock

This file was deleted.

3 changes: 1 addition & 2 deletions omniauth-auth0.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ omniauth-auth0 is the OmniAuth strategy for Auth0.

s.add_runtime_dependency 'omniauth-oauth2', '~> 1.5'

s.add_development_dependency 'bundler', '~> 1.9'

s.add_development_dependency 'bundler'
s.license = 'MIT'
end
7 changes: 7 additions & 0 deletions spec/omniauth/strategies/auth0_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
)
end

around do |t|
allowed_request_methods = OmniAuth.config.allowed_request_methods
OmniAuth.config.allowed_request_methods = [:post, :get]
t.run
OmniAuth.config.allowed_request_methods = allowed_request_methods
end

describe 'client_options' do
let(:subject) { auth0.client }

Expand Down