diff options
-rw-r--r-- | .github/workflows/main.yml | 95 | ||||
-rw-r--r-- | .travis.yml | 34 | ||||
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | spec/integration/omniauth-oauth2/Gemfile | 4 | ||||
-rw-r--r-- | spec/integration/omniauth/Gemfile | 4 |
6 files changed, 99 insertions, 44 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..5149d9b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,95 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + danger: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-ruby@v1 + with: + ruby-version: 2.7 + - uses: MeilCli/danger-action@v5 + with: + danger_file: Dangerfile + danger_id: danger-pr + install_path: vendor/bundle + plugins_file: Gemfile + env: + DANGER_GITHUB_API_TOKEN: ${{ secrets.github_token }} + + integration-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: 2.7 + - name: Run integration tests + run: | + for dir in spec/integration/*; do + echo "testing $dir integration" + BUNDLE_GEMFILE=$dir/Gemfile bundle install --jobs 4 --retry 3 + BUNDLE_GEMFILE=$dir/Gemfile bundle exec rspec $dir + done + + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby: + - 2.7 + - 2.6 + - 2.5 + - 2.4 + - 2.3 + - 2.2 + - 2.1 + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ${{ matrix.ruby }} + - name: Install dependencies + run: bundle install --jobs 4 --retry 3 + - name: Run tests + run: bundle exec rake + + test-jruby: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: + - macos + - ubuntu + jruby: + - jruby + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ${{ matrix.jruby }} + - name: Install dependencies + env: + JRUBY_OPTS: --debug + run: bundle install --jobs 4 --retry 3 + - name: Run tests + env: + JRUBY_OPTS: --debug + run: bundle exec rake diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 49230a1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: ruby -cache: bundler - -rvm: - - 2.6 - - 2.5 - - 2.4 - - 2.3 - - 2.2 - - 2.1 - - ruby-head - - jruby-9.2.11.1 - - jruby-head - - truffleruby - -matrix: - fast_finish: true - include: - - rvm: 2.7 - name: "Ruby: 2.7 (with Danger and Code Climate)" - before_script: - - bundle exec danger - after_script: - - bundle exec codeclimate-test-reporter - - rvm: 2.7 - name: "Integration Tests" - install: - - for dir in spec/integration/*; do BUNDLE_GEMFILE=$dir/Gemfile bundle; done - script: - - set -e ; for dir in spec/integration/*; do BUNDLE_GEMFILE=$dir/Gemfile bundle exec rspec $dir; done - allow_failures: - - rvm: ruby-head - - rvm: jruby-head - - rvm: truffleruby @@ -30,7 +30,7 @@ group :development do end group :test do - gem 'codeclimate-test-reporter', '~> 1.0', require: false gem 'danger-changelog', '~> 0.6.1', require: false gem 'danger-toc', '~> 0.2.0', require: false + gem 'simplecov' end @@ -2,9 +2,7 @@ [![Join the chat at https://gitter.im/hashie/hashie](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hashie/hashie?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Gem Version](http://img.shields.io/gem/v/hashie.svg)](http://badge.fury.io/rb/hashie) -[![Build Status](http://img.shields.io/travis/hashie/hashie.svg)](https://travis-ci.org/hashie/hashie) -[![Test Coverage](https://api.codeclimate.com/v1/badges/7a0b42c8a22c945571fd/test_coverage)](https://codeclimate.com/github/hashie/hashie/test_coverage) -[![Maintainability](https://api.codeclimate.com/v1/badges/7a0b42c8a22c945571fd/maintainability)](https://codeclimate.com/github/hashie/hashie/maintainability) +[![Build Status](https://github.com/hashie/hashie/actions/workflows/main.yml/badge.svg)](https://github.com/hashie/hashie/actions/workflows/main.yml) [![eierlegende Wollmilchsau](./mascot.svg)](#mascot) Hashie is a growing collection of tools that extend Hashes and make them more useful. diff --git a/spec/integration/omniauth-oauth2/Gemfile b/spec/integration/omniauth-oauth2/Gemfile index c081df6..91c3c2a 100644 --- a/spec/integration/omniauth-oauth2/Gemfile +++ b/spec/integration/omniauth-oauth2/Gemfile @@ -1,9 +1,7 @@ source 'http://rubygems.org' gem 'hashie', path: '../../..' -# Update omniauth to a pessimistic minor once omniauth releases changes in -# https://github.com/omniauth/omniauth/pull/977 -gem 'omniauth', git: 'https://github.com/omniauth/omniauth.git', branch: 'master' +gem 'omniauth' gem 'omniauth-oauth2', '~> 1.4.0' gem 'rails', '~> 5.0.1' gem 'rspec', '~> 3.5.0' diff --git a/spec/integration/omniauth/Gemfile b/spec/integration/omniauth/Gemfile index a29245b..af40e06 100644 --- a/spec/integration/omniauth/Gemfile +++ b/spec/integration/omniauth/Gemfile @@ -2,9 +2,7 @@ source 'http://rubygems.org' gem 'benchmark-ips' gem 'hashie', path: '../../..' -# Update omniauth to a pessimistic minor once https://github.com/omniauth/omniauth/issues/980 -# is resolved. -gem 'omniauth', git: 'https://github.com/omniauth/omniauth.git', branch: 'master' +gem 'omniauth' gem 'rack-test', '~> 0.6.3' gem 'rake' gem 'rspec', '~> 3.5.0' |