diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e423770 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI +on: + push: + schedule: + - cron: '0 1 * * 0' # every Sunday at 1am +jobs: + test: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + ruby: [2.2, 2.3, 2.4, 2.5, 2.6.2, head, jruby, jruby-head] + continue-on-error: ${{ endsWith(matrix.ruby, 'head') || endsWith(matrix.ruby, 'jruby') }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - run: bundle exec rake + coverage: + needs: [ test ] + name: coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.2' + bundler-cache: true + - run: bundle exec rake + env: + CUCUMBER_PUBLISH_TOKEN: ${{ secrets.CUCUMBER_PUBLISH_TOKEN }} + - uses: paambaati/codeclimate-action@v9.0.0 + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + with: + coverageLocations: | + ${{ github.workspace }}/coverage/lcov/*.lcov:lcov + debug: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f7677fd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -language: ruby -rvm: - - 2.2 - - 2.3 - - 2.4 - - 2.5 - - 2.6.2 - - ruby-head - - jruby -matrix: - exclude: - - rvm: jruby - os: osx - - rvm: ruby-head - os: osx - allow_failures: - - rvm: ruby-head - - rvm: jruby -os: - - linux - - osx -sudo: false -cache: - bundler: true -before_script: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-darwin-amd64 > ./cc-test-reporter ; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter ; fi - - chmod +x ./cc-test-reporter - - ./cc-test-reporter before-build -after_script: - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT - -# HACK: Continue to use bundler <2 because of Ruby v2.2 support. Once the -# lowest dependency is Ruby v2.3 we can consider upgrading to Bundler 2.x. -# @see https://docs.travis-ci.com/user/languages/ruby/#bundler-20 -before_install: - - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true - - gem install bundler -v '< 2' diff --git a/README.md b/README.md index 14eb3c0..bd734be 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Rspec::SideEffects [![Gem Version](https://badge.fury.io/rb/rspec-side_effects.svg)](http://badge.fury.io/rb/rspec-side_effects) -[![Build Status](https://travis-ci.org/sugarcrm/rspec-side_effects.svg?branch=master)](https://travis-ci.org/sugarcrm/rspec-side_effects) +[![Build Status](https://github.com/sugarcrm/rspec-side_effects/actions/workflows/ci.yml/badge.svg)](https://github.com/sugarcrm/rspec-side_effects/actions/workflows/ci.yml) [![Code Climate](https://codeclimate.com/github/sugarcrm/rspec-side_effects/badges/gpa.svg)](https://codeclimate.com/github/sugarcrm/rspec-side_effects) [![Test Coverage](https://codeclimate.com/github/sugarcrm/rspec-side_effects/badges/coverage.svg)](https://codeclimate.com/github/sugarcrm/rspec-side_effects/coverage) [![License](http://img.shields.io/badge/license-Apache2-green.svg?style=flat)](LICENSE)