Run all linters in the same job

This saves a bit of setup time. And it frees up a worker for the main
integration tests.
This commit is contained in:
Maikel Linke
2025-05-06 11:31:41 +10:00
parent 5cb2d0e061
commit ba46b597f5

View File

@@ -3,18 +3,32 @@ on: [push, pull_request]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
rubocop:
name: runner / rubocop
lint:
name: prettier and rubocop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
- name: Install JS dependencies
run: yarn install --frozen-lockfile
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: git show --no-patch # the commit being tested (which is often a merge due to actions/checkout@v3)
- name: prettier
uses: EPMatt/reviewdog-action-prettier@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
level: error
fail_on_error: true
- name: rubocop
uses: reviewdog/action-rubocop@v2
with:
@@ -25,26 +39,3 @@ jobs:
filter_mode: nofilter
use_bundler: true
fail_level: any
prettier:
name: runner / prettier
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
- name: Install JS dependencies
run: yarn install --frozen-lockfile
- run: git show --no-patch # the commit being tested (which is often a merge due to actions/checkout@v3)
- name: prettier
uses: EPMatt/reviewdog-action-prettier@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
level: error
fail_on_error: true