2023-01-18 12:10:11 -08:00
|
|
|
name: Lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
rubocop:
|
|
|
|
name: Rubocop
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3.3.0
|
|
|
|
- name: Set up Ruby
|
|
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
bundler-cache: true
|
|
|
|
- name: Run rubocop
|
|
|
|
uses: reviewdog/action-rubocop@v2
|
|
|
|
with:
|
|
|
|
rubocop_version: gemfile
|
|
|
|
rubocop_extensions: rubocop-rails:gemfile
|
|
|
|
reporter: github-pr-check
|
|
|
|
|
|
|
|
eslint:
|
|
|
|
name: ESLint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3.3.0
|
|
|
|
- name: Set up Node 14
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: '14'
|
2023-01-20 21:56:40 -08:00
|
|
|
cache: 'yarn'
|
2023-01-18 12:10:11 -08:00
|
|
|
- name: Install node modules
|
|
|
|
run: |
|
|
|
|
npm i -g yarn
|
|
|
|
yarn install --frozen-lockfile
|
|
|
|
- uses: reviewdog/action-eslint@v1
|
|
|
|
with:
|
|
|
|
reporter: github-check
|
|
|
|
eslint_flags: '--ext .ts app/javascript'
|
|
|
|
|
|
|
|
haml-lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3.3.0
|
|
|
|
- name: Set up Ruby
|
|
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
bundler-cache: true
|
|
|
|
- uses: patch-technology/action-haml-lint@0.4
|
|
|
|
with:
|
|
|
|
reporter: github-check
|
|
|
|
rubocop_version: gemfile
|
2023-01-18 13:10:39 -08:00
|
|
|
|
|
|
|
stylelint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3.3.0
|
|
|
|
- name: Set up Node 14
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: '14'
|
2023-01-20 21:56:40 -08:00
|
|
|
cache: 'yarn'
|
2023-01-18 13:10:39 -08:00
|
|
|
- name: Install node modules
|
|
|
|
run: |
|
|
|
|
npm i -g yarn
|
|
|
|
yarn install --frozen-lockfile
|
|
|
|
- name: stylelint
|
|
|
|
uses: pixeldesu/action-stylelint@5ec750b03a94da735352bdb02e9dfc3d5af33aba
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.github_token }}
|
|
|
|
reporter: github-pr-check
|
|
|
|
stylelint_input: 'app/assets/stylesheets/**/*.scss'
|