chore: cache the vp openapi and test tasks (#32733)
This commit is contained in:
parent
9071f534c0
commit
5ae0f49eeb
2 changed files with 18 additions and 3 deletions
|
|
@ -3,15 +3,12 @@
|
|||
"description": "evcc UI",
|
||||
"author": "evcc-io",
|
||||
"scripts": {
|
||||
"build": "vp build",
|
||||
"test": "cross-env TZ=Europe/Berlin NODE_OPTIONS=--no-experimental-webstorage vp test",
|
||||
"lint": "vp run lint:format && vp run lint:lint && vp run lint:tsc && vp run lint:i18n",
|
||||
"lint:format": "vp fmt assets tests i18n --write && vp fmt '**/*.{yaml,sh}' --write",
|
||||
"lint:lint": "vp lint --fix --max-warnings=0",
|
||||
"lint:tsc": "vue-tsc --noEmit",
|
||||
"lint:i18n": "tsx i18n/check.ts",
|
||||
"dev": "vp dev",
|
||||
"openapi": "tsx scripts/state-schema/index.ts",
|
||||
"playwright": "playwright install && playwright test --ui",
|
||||
"playwright:ci": "cross-env CI=true playwright test",
|
||||
"simulator": "vp dev tests/simulator",
|
||||
|
|
|
|||
|
|
@ -14,6 +14,24 @@ export default defineConfig({
|
|||
cache: {
|
||||
scripts: true,
|
||||
},
|
||||
tasks: {
|
||||
build: {
|
||||
command: "vp build",
|
||||
// node_modules layout differs between jobs that ran vitest and those that did not
|
||||
input: [{ auto: true }, "!**/node_modules/**"],
|
||||
},
|
||||
openapi: {
|
||||
command: "tsx scripts/state-schema/index.ts",
|
||||
// generated schema is an output, not an input
|
||||
input: [{ auto: true }, "!server/openapi.state.yaml"],
|
||||
},
|
||||
test: {
|
||||
command:
|
||||
"cross-env TZ=Europe/Berlin NODE_OPTIONS=--no-experimental-webstorage vp test",
|
||||
// vitest keeps its own result cache below node_modules
|
||||
input: [{ auto: true }, "!**/node_modules/.vite/**"],
|
||||
},
|
||||
},
|
||||
},
|
||||
staged: {
|
||||
"*": "vp check --fix",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue