mirror of
https://github.com/flarum/framework.git
synced 2025-01-30 22:38:43 +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
|
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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user