Skip to content

Commit

Permalink
Merge pull request #47 from yujinakayama/github-actions
Browse files Browse the repository at this point in the history
Migrate CI from Travis CI to GitHub Actions
  • Loading branch information
yujinakayama authored Oct 27, 2020
2 parents 5a1cbc0 + feacb61 commit 2050f3a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 15 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI
on: [push, pull_request]
jobs:
rspec:
name: RSpec
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [2.4, 2.5, 2.6, 2.7]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- run: bundle install
- run: bundle exec rspec
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
rubocop:
name: RuboCop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- run: bundle install
- run: bundle exec rubocop
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ source 'https://rubygems.org'
gemspec

group :test do
gem 'coveralls', '~> 0.6'
gem 'simplecov-lcov'
end
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[![Gem Version](https://badge.fury.io/rb/guard-rubocop.svg)](http://badge.fury.io/rb/guard-rubocop)
[![Build Status](https://travis-ci.org/yujinakayama/guard-rubocop.svg?branch=master&style=flat)](https://travis-ci.org/yujinakayama/guard-rubocop)
[![CI](https://github.com/yujinakayama/guard-rubocop/workflows/CI/badge.svg)](https://github.com/yujinakayama/guard-rubocop/actions)
[![Coverage Status](https://coveralls.io/repos/yujinakayama/guard-rubocop/badge.svg?branch=master&service=github)](https://coveralls.io/github/yujinakayama/guard-rubocop?branch=master)
[![Code Climate](https://codeclimate.com/github/yujinakayama/guard-rubocop/badges/gpa.svg)](https://codeclimate.com/github/yujinakayama/guard-rubocop)

# guard-rubocop

**guard-rubocop** allows you to automatically check Ruby code style with [RuboCop](https://github.com/bbatsov/rubocop) when files are modified.

Tested on MRI 2.2, 2.3, 2.4 and JRuby 9000.
Tested on MRI 2.4 - 2.7.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion guard-rubocop.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'guard', '~> 2.0'
spec.add_runtime_dependency 'rubocop', '< 2.0'

spec.add_development_dependency 'bundler', '~> 1.3'
spec.add_development_dependency 'bundler'
spec.add_development_dependency 'guard-rspec', '>= 4.2.3', '< 5.0'
spec.add_development_dependency 'launchy', '~> 2.4'
spec.add_development_dependency 'rake', '>= 12.0'
Expand Down
10 changes: 8 additions & 2 deletions spec/support/simplecov.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
require 'simplecov'

if ENV['CI']
require 'coveralls'
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
require 'simplecov-lcov'

SimpleCov::Formatter::LcovFormatter.config do |config|
config.report_with_single_file = true
config.single_report_path = 'coverage/lcov.info'
end

SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
end

SimpleCov.start do
Expand Down

0 comments on commit 2050f3a

Please sign in to comment.