mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-09 07:09:36 +08:00
Cache dependencies (#2454)
* Cache dependencies * Add linting to pre-commit hook
This commit is contained in:
parent
eef8970d98
commit
16855219f8
2 changed files with 21 additions and 4 deletions
23
.github/workflows/pr-check.yml
vendored
23
.github/workflows/pr-check.yml
vendored
|
@ -4,16 +4,33 @@ on:
|
|||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
branches: [master, api-overhaul]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "16.13.2"
|
||||
- run: npm run install:all
|
||||
- run: npm run lint
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm run install:all
|
||||
|
||||
- name: Check for lint
|
||||
run: npm run lint
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "pretty-quick --staged"
|
||||
"pre-commit": "pretty-quick --staged && npm run lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue