mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Merge pull request #23545 from opf/reviewdog-failures
fix and cleanup linter actions
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
name: ERB lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '**/*.erb'
|
||||
- '.erb_lint.yml'
|
||||
- '.erb_linters/**'
|
||||
|
||||
jobs:
|
||||
erb-lint:
|
||||
name: ERB lint
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
checks: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
- name: Run ERB lint
|
||||
uses: opf/action-erblint@49c54b56c60d0c50885065468cf149b61d5c2a60 # main
|
||||
with:
|
||||
reporter: github-pr-check
|
||||
use_bundler: true
|
||||
@@ -1,4 +1,5 @@
|
||||
name: eslint
|
||||
name: ESLint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
@@ -11,23 +12,26 @@ on:
|
||||
|
||||
jobs:
|
||||
eslint:
|
||||
name: eslint
|
||||
name: ESLint
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
checks: write
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||
with:
|
||||
node-version: '22.15'
|
||||
package-manager-cache: false
|
||||
cache: npm
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
- uses: reviewdog/action-eslint@556a3fdaf8b4201d4d74d406013386aa4f7dab96 # v1
|
||||
- name: Run ESLint
|
||||
uses: reviewdog/action-eslint@556a3fdaf8b4201d4d74d406013386aa4f7dab96 # v1
|
||||
with:
|
||||
reporter: github-pr-check
|
||||
workdir: 'frontend/'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: rubocop
|
||||
name: RuboCop
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -7,22 +7,22 @@ on:
|
||||
|
||||
jobs:
|
||||
rubocop:
|
||||
name: rubocop
|
||||
name: RuboCop
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
checks: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1
|
||||
- name: Run Rubocop
|
||||
- name: Run RuboCop
|
||||
uses: reviewdog/action-rubocop@b6d5e953a5fc0bf3ab65254e77730ea2174d6d6d # v2
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
reporter: github-pr-check
|
||||
rubocop_version: gemfile
|
||||
rubocop_extensions: >
|
||||
rubocop-capybara:gemfile
|
||||
@@ -32,13 +32,4 @@ jobs:
|
||||
rubocop-rails:gemfile
|
||||
rubocop-rspec:gemfile
|
||||
rubocop-rspec_rails:gemfile
|
||||
reporter: github-pr-check
|
||||
only_changed: true
|
||||
- name: Install erb_lint
|
||||
run: gem install -N erb_lint erblint-github
|
||||
- name: Run erb-lint
|
||||
uses: tk0miya/action-erblint@44c5fe3552356fe8bff23f30d534aa4258aa3f7b # v1
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
reporter: github-pr-check
|
||||
fail_on_error: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: yamllint
|
||||
name: Yamllint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -9,23 +9,22 @@ on:
|
||||
- 'modules/*/config/locales/en.yml'
|
||||
- 'modules/*/config/locales/js-en.yml'
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
rubocop:
|
||||
name: yamllint
|
||||
yamllint:
|
||||
name: Yamllint
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
checks: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Run Yamllint
|
||||
uses: reviewdog/action-yamllint@f01d8a48fd8d89f89895499fca2cff09f9e9e8c0 # v1.21.0
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
fail_level: error
|
||||
reporter: github-pr-check
|
||||
yamllint_flags: >
|
||||
.yamllint.yml
|
||||
config/locales/en.yml
|
||||
|
||||
Reference in New Issue
Block a user