mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 16:19:52 +01:00
c82c3b1d40
Bumps [reviewdog/action-stylelint](https://github.com/reviewdog/action-stylelint) from 1.24.0 to 1.26.0. - [Release notes](https://github.com/reviewdog/action-stylelint/releases) - [Commits](https://github.com/reviewdog/action-stylelint/compare/v1.24.0...v1.26.0) --- updated-dependencies: - dependency-name: reviewdog/action-stylelint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
112 lines
3.5 KiB
YAML
112 lines
3.5 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
rubocop:
|
|
name: Rubocop
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4.1.7
|
|
- name: Get changed files
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@v44
|
|
with:
|
|
files: "**/*.rb"
|
|
- name: Install dependencies
|
|
run: sudo apt update && sudo apt-get install -y libpq-dev libxml2-dev libxslt1-dev libmagickwand-dev imagemagick libidn11-dev
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
- name: Set up Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
bundler-cache: true
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
- name: Run rubocop
|
|
uses: reviewdog/action-rubocop@v2
|
|
with:
|
|
rubocop_version: gemfile
|
|
rubocop_extensions: rubocop-rails:gemfile
|
|
reporter: github-pr-check
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
|
|
eslint:
|
|
name: ESLint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4.1.7
|
|
- name: Get changed files
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@v44
|
|
with:
|
|
files: "**/*.ts"
|
|
- name: Set up Node 16
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '16'
|
|
cache: 'yarn'
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
- name: Install node modules
|
|
run: |
|
|
npm i -g yarn
|
|
yarn install --frozen-lockfile
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
- uses: reviewdog/action-eslint@v1
|
|
with:
|
|
reporter: github-check
|
|
eslint_flags: '--ext .ts app/javascript'
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
|
|
haml-lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4.1.7
|
|
- name: Get changed files
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@v44
|
|
with:
|
|
files: "**/*.haml"
|
|
- name: Install dependencies
|
|
run: sudo apt update && sudo apt-get install -y libpq-dev libxml2-dev libxslt1-dev libmagickwand-dev imagemagick libidn11-dev
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
- name: Set up Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
bundler-cache: true
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
- uses: patch-technology/action-haml-lint@0.5
|
|
with:
|
|
reporter: github-check
|
|
rubocop_version: gemfile
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
|
|
stylelint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4.1.7
|
|
- name: Get changed files
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@v44
|
|
with:
|
|
files: "**/*.scss"
|
|
- name: Set up Node 16
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '16'
|
|
cache: 'yarn'
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
- name: Install node modules
|
|
run: |
|
|
npm i -g yarn
|
|
yarn install --frozen-lockfile
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
- name: stylelint
|
|
uses: reviewdog/action-stylelint@v1.26.0
|
|
with:
|
|
github_token: ${{ secrets.github_token }}
|
|
reporter: github-pr-check
|
|
stylelint_input: 'app/assets/stylesheets/**/*.scss'
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|