Update Rubocop config, fix offenses #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
schedule: | |
- cron: '0 4 1 * *' | |
jobs: | |
rubocop: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
- name: Bundler | |
run: bundle install | |
- name: Rubocop | |
run: bin/rubocop | |
rspec: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: 'postgres:14' | |
ports: ['5432:5432'] | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: store_base_sti_class_test | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: | |
- '3.3' | |
- '3.2' | |
- '3.1' | |
- 'head' | |
rails: | |
- activerecord_7.2.0 | |
- activerecord_7.1.3 | |
- activerecord_7.0.8 | |
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps | |
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}.gemfile | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: RSpec | |
run: bin/rspec |