Skip to content

Commit

Permalink
DEV: Switch from Travis to Actions (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
OsamaSayegh authored Dec 4, 2020
1 parent 55e4d9e commit 6667b2e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 10 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Omniauth JWT Tests

on:
pull_request:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby: ["2.7", "2.6", "2.5"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Bundler cache
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ruby }}-gems-
- name: Setup gems
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4
- name: Tests
run: bundle exec rspec
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion discourse-omniauth-jwt.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec"
spec.add_development_dependency "guard"
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/omniauth/strategies/jwt_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'

describe OmniAuth::Strategies::JWT do
let(:response_json){ MultiJson.load(last_response.body) }
let(:response_json){ JSON.parse(last_response.body) }
let(:args){ ['imasecret', {auth_url: 'http://example.com/login'}] }

let(:app){
Expand Down Expand Up @@ -62,4 +62,4 @@
end
end
end
end
end
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true
config.run_all_when_everything_filtered = true
config.filter_run :focus

Expand Down

0 comments on commit 6667b2e

Please sign in to comment.