Skip to content

Commit 0467431

Browse files
chore: Faster npm pre-committ
Signed-off-by: Francisco Javier Arceo <[email protected]>
1 parent e7a812f commit 0467431

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/pre-commit.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ jobs:
3636
**/requirements*.txt
3737
.pre-commit-config.yaml
3838
39+
- name: Set up Node.js
40+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
41+
with:
42+
node-version: '20'
43+
cache: 'npm'
44+
cache-dependency-path: 'llama_stack/ui/'
45+
46+
- name: Install npm dependencies
47+
run: npm ci
48+
3949
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
4050
continue-on-error: true
4151
env:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ repos:
155155
require_serial: true
156156
- id: ui-eslint
157157
name: Lint UI code with ESLint
158-
entry: bash -c 'cd llama_stack/ui && npm ci && npm run lint -- --fix --quiet'
158+
entry: bash -c 'cd llama_stack/ui && && npm run lint -- --fix --quiet'
159159
language: system
160160
files: ^llama_stack/ui/.*\.(ts|tsx)$
161161
pass_filenames: false

0 commit comments

Comments
 (0)