diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3ccdf5d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI + +on: [push, pull_request] + +jobs: + test: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + ruby: ["2.6", "2.7", "3.0"] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Set up Ruby, bundler and dependencies + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Run tests + run: bundle exec rspec + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5bc3540..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -env: - global: - - CC_TEST_REPORTER_ID=9010151f70b4290cde9faef9a40f2b7341f237f2dbb5cd3031013ff440f8c3d2 - - GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --s -language: ruby -install: bundle install -j 4 --retry 3 -before_script: - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter -script: - - RAILS_ENV=test bundle exec rspec spec -after_script: - - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi -matrix: - include: - - rvm: "2.0.0" - gemfile: Gemfile-old-ruby - - rvm: "2.1.7" - - rvm: "2.2.1" - - rvm: "2.2.7" - - rvm: "2.3.5" - - rvm: "2.4.6" diff --git a/README.md b/README.md index 64b0b4c..e911c90 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cassette::Client -[![Build Status](https://travis-ci.org/locaweb/cassette.svg)](https://travis-ci.org/locaweb/cassette) +[![Build Status](https://github.com/locaweb/cassette/actions/workflows/ci.yml/badge.svg)](https://github.com/locaweb/cassette/actions/workflows/ci.yml) [![Test Coverage](https://codeclimate.com/github/locaweb/cassette/badges/coverage.svg)](https://codeclimate.com/github/locaweb/cassette/coverage) diff --git a/lib/cassette/authentication/cache.rb b/lib/cassette/authentication/cache.rb index 40e1215..7e21189 100644 --- a/lib/cassette/authentication/cache.rb +++ b/lib/cassette/authentication/cache.rb @@ -2,6 +2,7 @@ require 'cassette/authentication' require 'cassette/cache' +require 'active_support/notifications' module Cassette class Authentication