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
This commit is contained in:
David Wheatley 2021-03-18 21:14:10 +00:00 committed by GitHub
parent dc990a6e37
commit ed3832481e

View File

@ -1,6 +1,7 @@
name: Lint name: Lint
on: on:
workflow_dispatch:
push: push:
paths: paths:
- 'js/src/**' - 'js/src/**'
@ -10,22 +11,18 @@ on:
jobs: jobs:
prettier: prettier:
name: JS / Prettier
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: JS / Prettier
steps: steps:
- uses: actions/checkout@master - name: Check out code
uses: actions/checkout@master
- name: Setup Node.js - name: Set up Node
uses: actions/setup-node@v1 uses: actions/setup-node@v2
with: with:
node-version: "12" node-version: "14"
- name: Install JS dependencies - name: Check JS formatting
run: npm ci run: npx prettier --check src
working-directory: ./js
- name: Check JS code for formatting
run: node_modules/.bin/prettier --check src
working-directory: ./js working-directory: ./js