From 69513588d8471246045fe9f44e175763521c8151 Mon Sep 17 00:00:00 2001 From: Adam Steel Date: Thu, 28 Mar 2024 16:54:11 -0600 Subject: [PATCH] Add GH actions --- .github/workflows/actions.yaml | 37 ++++++++++++++++++++++++++++++++++ .gitignore | 3 ++- .rubocop.yml | 6 +++--- 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/actions.yaml diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml new file mode 100644 index 0000000..48ccae5 --- /dev/null +++ b/.github/workflows/actions.yaml @@ -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 diff --git a/.gitignore b/.gitignore index 152cfbb..b97812b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ /pkg/ /spec/reports/ /tmp/ -/*.gem \ No newline at end of file +/*.gem +.tool-versions diff --git a/.rubocop.yml b/.rubocop.yml index 4f52ae8..98bea34 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -16,6 +16,9 @@ Layout/SpaceInsideArrayLiteralBrackets: Layout/SpaceInsideParens: Enabled: false +Lint/MissingSuper: + Enabled: false + Metrics/BlockLength: Enabled: false @@ -34,9 +37,6 @@ Style/ExpandPathArguments: Style/Lambda: Enabled: false -Style/MethodMissingSuper: - Enabled: false - Style/MutableConstant: Enabled: true