Skip to content

Commit

Permalink
Merge pull request #49 from ezr-ondrej/gh_actions
Browse files Browse the repository at this point in the history
Replace Travis with GH actions and test on new Ruby
  • Loading branch information
tboerger committed Dec 6, 2021
2 parents d59c064 + c69a415 commit 9f3d967
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 34 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.1
bundler-cache: true
- name: Run rubocop
if: github.event_name != 'push'
run: bundle exec rubocop
test_ruby:
runs-on: ubuntu-latest
needs: rubocop
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
ruby: [2.1, 2.5, 2.7]
rails: ['3.2', '4.2', '5.2', '6.1']
exclude:
# excludes new rails on old ruby
- rails: '5.2'
ruby: 2.1
- rails: '6.1'
ruby: 2.1
# excludes old rails on new ruby
- rails: '3.2'
ruby: 2.7
- rails: '4.2'
ruby: 2.7
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: 1.17
bundler-cache: true
env:
RAILS_VERSION: ${{ matrix.rails }}
- name: Run tests
run: |
bundle exec rspec
19 changes: 12 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
inherit_from: .rubocop_todo.yml

Layout/ElseAlignment:
Enabled: false

Layout/ParameterAlignment:
EnforcedStyle: with_fixed_indentation

Style/StringLiterals:
EnforcedStyle: double_quotes

Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes

Style/AlignParameters:
EnforcedStyle: with_fixed_indentation

Style/Documentation:
Enabled: false

Expand All @@ -19,9 +24,6 @@ Style/WordArray:
Style/PerlBackrefs:
Enabled: false

Style/ElseAlignment:
Enabled: false

Style/Next:
Enabled: false

Expand All @@ -32,6 +34,9 @@ Metrics/MethodLength:
CountComments: false
Max: 30

Style/SymbolArray:
EnforcedStyle: brackets

Metrics/ClassLength:
Max: 300

Expand All @@ -40,4 +45,4 @@ Metrics/BlockLength:
- "gettext_i18n_rails_js.gemspec"
- "**/*_spec.rb"
ExcludedMethods:
- "namespace"
- namespace
30 changes: 30 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Gemspec/OrderedDependencies:
Enabled: false

Gemspec/RequiredRubyVersion:
Enabled: false

Lint/DuplicateMethods:
Enabled: false

Metrics/AbcSize:
Max: 22

Metrics/LineLength:
Exclude:
- spec/gettext_i18n_rails_js/parser/javascript_spec.rb

Naming/HeredocDelimiterNaming:
Enabled: false

Style/Encoding:
Enabled: false

Style/ExpandPathArguments:
Enabled: false

Style/FormatStringToken:
Enabled: false

Style/TrailingCommaInArrayLiteral:
Enabled: false
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

0 comments on commit 9f3d967

Please sign in to comment.