Skip to content

Commit

Permalink
Merge pull request #34 from adsteel/ags/gh-actions
Browse files Browse the repository at this point in the history
Add GH actions
  • Loading branch information
adsteel committed Mar 28, 2024
2 parents 09e2d52 + 75a1907 commit 54b7cf5
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 14 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup linting
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
with:
ruby-version: 3.0
- name: Install dependencies
run: bundle install
- name: Lint
run: bundle exec rubocop

test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.2', '3.1']
steps:
- uses: actions/checkout@v4
- name: Setup tests with Ruby version ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rspec
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
/pkg/
/spec/reports/
/tmp/
/*.gem
/*.gem
.tool-versions
10 changes: 7 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ AllCops:
Include:
- 'lib/**/*'
- 'spec/**/*'
SuggestExtensions: false

Layout/LineLength:
Max: 120
Expand All @@ -16,12 +17,18 @@ Layout/SpaceInsideArrayLiteralBrackets:
Layout/SpaceInsideParens:
Enabled: false

Lint/MissingSuper:
Enabled: false

Metrics/BlockLength:
Enabled: false

Metrics/MethodLength:
Enabled: false

Style/AccessorGrouping:
Enabled: false

Style/BlockDelimiters:
Enabled: false

Expand All @@ -34,9 +41,6 @@ Style/ExpandPathArguments:
Style/Lambda:
Enabled: false

Style/MethodMissingSuper:
Enabled: false

Style/MutableConstant:
Enabled: true

Expand Down
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion lib/hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def method_missing(method, *args)
end
end

def respond_to?(method, include_all = false)
def respond_to?(method, include_all = false) # rubocop:disable Style/OptionalBooleanParameter
return super(method, include_all) unless to_dot?

prop = create_prop(method)
Expand Down

0 comments on commit 54b7cf5

Please sign in to comment.