ci: optimize pnpm install to prevent lock file conflicts
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Changed CI pipeline to install dependencies only once in the install step. All subsequent steps now reuse the installed node_modules instead of reinstalling, which prevents ENOENT errors from concurrent pnpm lock file operations. - Only 'install' step runs 'pnpm install --frozen-lockfile' - All other steps use 'corepack enable' and reuse existing dependencies - Fixes ENOENT chown errors on lock.yaml temporary files Refs #CI-woodpecker Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,8 @@ variables:
|
|||||||
- &install_deps |
|
- &install_deps |
|
||||||
corepack enable
|
corepack enable
|
||||||
pnpm install --frozen-lockfile
|
pnpm install --frozen-lockfile
|
||||||
|
- &use_deps |
|
||||||
|
corepack enable
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
install:
|
install:
|
||||||
@@ -17,7 +19,7 @@ steps:
|
|||||||
security-audit:
|
security-audit:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
commands:
|
commands:
|
||||||
- *install_deps
|
- *use_deps
|
||||||
- pnpm audit --audit-level=high
|
- pnpm audit --audit-level=high
|
||||||
depends_on:
|
depends_on:
|
||||||
- install
|
- install
|
||||||
@@ -27,7 +29,7 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
SKIP_ENV_VALIDATION: "true"
|
SKIP_ENV_VALIDATION: "true"
|
||||||
commands:
|
commands:
|
||||||
- *install_deps
|
- *use_deps
|
||||||
- pnpm lint || true # Non-blocking while fixing legacy code
|
- pnpm lint || true # Non-blocking while fixing legacy code
|
||||||
depends_on:
|
depends_on:
|
||||||
- install
|
- install
|
||||||
@@ -39,7 +41,7 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
SKIP_ENV_VALIDATION: "true"
|
SKIP_ENV_VALIDATION: "true"
|
||||||
commands:
|
commands:
|
||||||
- *install_deps
|
- *use_deps
|
||||||
- pnpm --filter "@mosaic/api" prisma:generate
|
- pnpm --filter "@mosaic/api" prisma:generate
|
||||||
depends_on:
|
depends_on:
|
||||||
- install
|
- install
|
||||||
@@ -49,7 +51,7 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
SKIP_ENV_VALIDATION: "true"
|
SKIP_ENV_VALIDATION: "true"
|
||||||
commands:
|
commands:
|
||||||
- *install_deps
|
- *use_deps
|
||||||
- pnpm --filter "@mosaic/api" prisma:generate
|
- pnpm --filter "@mosaic/api" prisma:generate
|
||||||
- pnpm typecheck
|
- pnpm typecheck
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -60,7 +62,7 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
SKIP_ENV_VALIDATION: "true"
|
SKIP_ENV_VALIDATION: "true"
|
||||||
commands:
|
commands:
|
||||||
- *install_deps
|
- *use_deps
|
||||||
- pnpm --filter "@mosaic/api" prisma:generate
|
- pnpm --filter "@mosaic/api" prisma:generate
|
||||||
- pnpm test || true # Non-blocking while fixing legacy tests
|
- pnpm test || true # Non-blocking while fixing legacy tests
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -72,7 +74,7 @@ steps:
|
|||||||
SKIP_ENV_VALIDATION: "true"
|
SKIP_ENV_VALIDATION: "true"
|
||||||
NODE_ENV: "production"
|
NODE_ENV: "production"
|
||||||
commands:
|
commands:
|
||||||
- *install_deps
|
- *use_deps
|
||||||
- pnpm --filter "@mosaic/api" prisma:generate
|
- pnpm --filter "@mosaic/api" prisma:generate
|
||||||
- pnpm build
|
- pnpm build
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
Reference in New Issue
Block a user