fix(ci): sequential steps + single install to prevent OOM on runner
Each step was re-running pnpm install independently, and all quality steps (typecheck, lint, format, test) ran in parallel. On merge commits with more accumulated code this pushed the CI runner over its memory limit (exit code 254 = OOM kill). Fix: - install once, share node_modules via Woodpecker workspace volume - sequential execution: install → typecheck → lint → format → test → build - corepack enable in each step (fresh container) but no redundant install
This commit is contained in:
@@ -1,22 +1,25 @@
|
|||||||
variables:
|
variables:
|
||||||
- &node_image 'node:22-alpine'
|
- &node_image 'node:22-alpine'
|
||||||
- &install_deps |
|
- &enable_pnpm 'corepack enable'
|
||||||
corepack enable
|
|
||||||
pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: [push, pull_request, manual]
|
- event: [push, pull_request, manual]
|
||||||
|
|
||||||
|
# Steps run sequentially to avoid OOM on the CI runner.
|
||||||
|
# node_modules is installed once by the install step and shared across
|
||||||
|
# all subsequent steps via Woodpecker's shared workspace volume.
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
install:
|
install:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
commands:
|
commands:
|
||||||
- *install_deps
|
- corepack enable
|
||||||
|
- pnpm install --frozen-lockfile
|
||||||
|
|
||||||
typecheck:
|
typecheck:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
commands:
|
commands:
|
||||||
- *install_deps
|
- *enable_pnpm
|
||||||
- pnpm typecheck
|
- pnpm typecheck
|
||||||
depends_on:
|
depends_on:
|
||||||
- install
|
- install
|
||||||
@@ -24,34 +27,31 @@ steps:
|
|||||||
lint:
|
lint:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
commands:
|
commands:
|
||||||
- *install_deps
|
- *enable_pnpm
|
||||||
- pnpm lint
|
- pnpm lint
|
||||||
depends_on:
|
depends_on:
|
||||||
- install
|
- typecheck
|
||||||
|
|
||||||
format:
|
format:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
commands:
|
commands:
|
||||||
- *install_deps
|
- *enable_pnpm
|
||||||
- pnpm format:check
|
- pnpm format:check
|
||||||
depends_on:
|
depends_on:
|
||||||
- install
|
- lint
|
||||||
|
|
||||||
test:
|
test:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
commands:
|
commands:
|
||||||
- *install_deps
|
- *enable_pnpm
|
||||||
- pnpm test
|
- pnpm test
|
||||||
depends_on:
|
depends_on:
|
||||||
- install
|
- format
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
commands:
|
commands:
|
||||||
- *install_deps
|
- *enable_pnpm
|
||||||
- pnpm build
|
- pnpm build
|
||||||
depends_on:
|
depends_on:
|
||||||
- typecheck
|
|
||||||
- lint
|
|
||||||
- format
|
|
||||||
- test
|
- test
|
||||||
|
|||||||
Reference in New Issue
Block a user