From fc34b6b080c6caeab5471b774b12b2356eed6012 Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Tue, 15 Feb 2022 17:45:51 -0500 Subject: [PATCH] Switch to GitHub Actions --- .github/workflows/ci.yaml | 33 +++++++++++++++++++++++++++++++++ .rspec | 2 +- .travis.yml | 7 ------- README.md | 2 +- log_decorator.gemspec | 7 +++---- 5 files changed, 38 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..77a83a3 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,33 @@ +name: CI + +on: + push: + pull_request: + schedule: + - cron: '0 0 * * 0' + +jobs: + ci: + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: + - '2.5' + - '2.6' + - '2.7' + - '3.0' + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: Run tests + run: bundle exec rake + - name: Report code coverage + if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '3.0' }} + continue-on-error: true + uses: paambaati/codeclimate-action@v3.0.0 diff --git a/.rspec b/.rspec index 7a2cc1a..b4065e3 100644 --- a/.rspec +++ b/.rspec @@ -1,3 +1,3 @@ --require spec_helper ---format documentation --color +--order random diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 950ee97..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: ruby -cache: bundler -rvm: - - "2.5" - - "2.6" - - "2.7" -after_script: bundle exec codeclimate-test-reporter diff --git a/README.md b/README.md index f23aa9b..703bba0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # LogDecorator [![Gem Version](https://badge.fury.io/rb/log_decorator.svg)](http://badge.fury.io/rb/log_decorator) -[![Build Status](https://travis-ci.org/ManageIQ/log_decorator.svg)](https://travis-ci.org/ManageIQ/log_decorator) +[![CI](https://github.com/ManageIQ/log_decorator/actions/workflows/ci.yaml/badge.svg)](https://github.com/ManageIQ/log_decorator/actions/workflows/ci.yaml) [![Code Climate](https://codeclimate.com/github/ManageIQ/log_decorator.svg)](https://codeclimate.com/github/ManageIQ/log_decorator) [![Test Coverage](https://codeclimate.com/github/ManageIQ/log_decorator/badges/coverage.svg)](https://codeclimate.com/github/ManageIQ/log_decorator/coverage) diff --git a/log_decorator.gemspec b/log_decorator.gemspec index df793f8..8ff33c7 100644 --- a/log_decorator.gemspec +++ b/log_decorator.gemspec @@ -24,9 +24,8 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0" spec.add_development_dependency "manageiq-style" - spec.add_development_dependency "rake", ">= 12.3.3" - spec.add_development_dependency "rspec", "~> 3.0" - spec.add_development_dependency "simplecov" + spec.add_development_dependency "rake", ">= 12.3.3" + spec.add_development_dependency "rspec", "~> 3.0" + spec.add_development_dependency "simplecov", ">= 0.21.2" end