Skip to content

Commit

Permalink
Add GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
adsteel committed Mar 28, 2024
1 parent 09e2d52 commit 6951358
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 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
6 changes: 3 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Layout/SpaceInsideArrayLiteralBrackets:
Layout/SpaceInsideParens:
Enabled: false

Lint/MissingSuper:
Enabled: false

Metrics/BlockLength:
Enabled: false

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

Style/MethodMissingSuper:
Enabled: false

Style/MutableConstant:
Enabled: true

Expand Down

0 comments on commit 6951358

Please sign in to comment.