From 59fdd7628a32e9c6af65dcb9990e1f6015346def Mon Sep 17 00:00:00 2001 From: David Wheatley Date: Thu, 18 Mar 2021 21:14:10 +0000 Subject: [PATCH] Speed up JS linting (#2709) * Install Prettier only, instead of all deps * Allow running on workflow dispatch Allows manually triggered CI runs by org members * Update Node to latest LTS; update step descriptions --- .github/workflows/lint.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0993770db..bc489dcd0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,7 @@ name: Lint on: + workflow_dispatch: push: paths: - 'js/src/**' @@ -10,22 +11,18 @@ on: jobs: prettier: + name: JS / Prettier runs-on: ubuntu-latest - name: JS / Prettier - steps: - - uses: actions/checkout@master + - name: Check out code + uses: actions/checkout@master - - name: Setup Node.js - uses: actions/setup-node@v1 + - name: Set up Node + uses: actions/setup-node@v2 with: - node-version: "12" + node-version: "14" - - name: Install JS dependencies - run: npm ci - working-directory: ./js - - - name: Check JS code for formatting - run: node_modules/.bin/prettier --check src + - name: Check JS formatting + run: npx prettier --check src working-directory: ./js