From ba46b597f55d62f0465eb68bbdba68b6e4be3ef5 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Tue, 6 May 2025 11:31:41 +1000 Subject: [PATCH] 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. --- .github/workflows/linters.yml | 41 ++++++++++++++--------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index f93c65bf72..9711bff6e4 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -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