Skip to content

Commit

Permalink
Merge pull request rubocop#3 from petergoldstein/feature/migrate_ci_t…
Browse files Browse the repository at this point in the history
…o_github_actions

Migrate CI to GitHub Actions
  • Loading branch information
mikegee committed May 18, 2022
2 parents e95b701 + d17a86d commit 0a25f3c
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 98 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,25 @@
name: CI

on: [push, pull_request]

jobs:
test:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
ruby: ["2.5", "2.6", "2.7", "3.0", "3.1", ruby-head, jruby-9.2, jruby-9.3]
rubocop_version: ["0.86", "1.20"]
env:
BUNDLE_GEMFILE: "gemfiles/rubocop_${{ matrix.rubocop_version }}.gemfile"
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # 'bundle install' and cache gems
ruby-version: ${{ matrix.ruby }}
- name: Run tests
run: bundle exec rspec
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,19 @@
name: Lint

on: [push, pull_request]

jobs:
lint:

runs-on: ubuntu-latest
name: Rubocop

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # 'bundle install' and cache gems
ruby-version: "2.7"
- name: Run Rubocop
run: bundle exec rubocop
2 changes: 1 addition & 1 deletion .rubocop.yml
@@ -1,6 +1,6 @@
AllCops:
DisplayCopNames: true
TargetRubyVersion: 2.3
TargetRubyVersion: 2.5

Lint/RaiseException:
Enabled: true
Expand Down
64 changes: 0 additions & 64 deletions .travis.yml

This file was deleted.

22 changes: 4 additions & 18 deletions Appraisals
@@ -1,23 +1,9 @@
# frozen_string_literal: true

appraise 'rubocop-0.53' do
gem 'rubocop', '~> 0.53.0'
appraise 'rubocop-0.86' do
gem 'rubocop', '~> 0.86.0'
end

appraise 'rubocop-0.81' do
gem 'rubocop', '~> 0.81.0'
end

if Gem::Requirement.new('>= 2.4.0')
.satisfied_by?(Gem::Version.new(RUBY_VERSION))
appraise 'rubocop-0.86' do
gem 'rubocop', '~> 0.86.0'
end
end

if Gem::Requirement.new('>= 2.5.0')
.satisfied_by?(Gem::Version.new(RUBY_VERSION))
appraise 'rubocop-1.20' do
gem 'rubocop', '~> 1.20.0'
end
appraise 'rubocop-1.20' do
gem 'rubocop', '~> 1.20.0'
end
7 changes: 0 additions & 7 deletions gemfiles/rubocop_0.53.gemfile

This file was deleted.

7 changes: 0 additions & 7 deletions gemfiles/rubocop_0.81.gemfile

This file was deleted.

2 changes: 1 addition & 1 deletion rubocop-thread_safety.gemspec
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.required_ruby_version = '>= 2.3.0'
spec.required_ruby_version = '>= 2.5.0'

spec.add_runtime_dependency 'rubocop', '>= 0.53.0'

Expand Down

0 comments on commit 0a25f3c

Please sign in to comment.