mirror of
https://github.com/flarum/framework.git
synced 2025-01-30 16:34:16 +08:00
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:
parent
dc990a6e37
commit
ed3832481e
21
framework/core/.github/workflows/lint.yml
vendored
21
framework/core/.github/workflows/lint.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user