Separate specs from rubocop in github actions

This commit is contained in:
Tim Kächele 2021-06-06 12:38:57 +02:00
parent 0dd62e5d54
commit a91aea88f8
4 changed files with 24 additions and 3 deletions

View File

@ -3,7 +3,7 @@ name: Ruby
on: [push,pull_request]
jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@ -16,3 +16,16 @@ jobs:
gem install bundler -v 2.2.2
bundle install
bundle exec rake
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0
- name: Run the default task
run: |
gem install bundler -v 2.2.2
bundle install
bundle exec rubocop

View File

@ -1,3 +1,6 @@
AllCops:
TargetRubyVersion: 2.4
Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
@ -8,3 +11,8 @@ Style/StringLiteralsInInterpolation:
Layout/LineLength:
Max: 120
Metrics/BlockLength:
Enabled: true
Exclude:
- spec/*_spec.rb

View File

@ -9,4 +9,4 @@ require "rubocop/rake_task"
RuboCop::RakeTask.new
task default: %i[spec rubocop]
task default: %i[spec]

View File

@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.description = ""
spec.homepage = "https://github.com/timkaechele/liquid_dynamic_context"
spec.license = "MIT"
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"