diff --git a/.woodpecker/ci.yml b/.woodpecker/ci.yml index 3bcf79b..21af84c 100644 --- a/.woodpecker/ci.yml +++ b/.woodpecker/ci.yml @@ -1,22 +1,25 @@ variables: - &node_image 'node:22-alpine' - - &install_deps | - corepack enable - pnpm install --frozen-lockfile + - &enable_pnpm 'corepack enable' when: - 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: install: image: *node_image commands: - - *install_deps + - corepack enable + - pnpm install --frozen-lockfile typecheck: image: *node_image commands: - - *install_deps + - *enable_pnpm - pnpm typecheck depends_on: - install @@ -24,34 +27,31 @@ steps: lint: image: *node_image commands: - - *install_deps + - *enable_pnpm - pnpm lint depends_on: - - install + - typecheck format: image: *node_image commands: - - *install_deps + - *enable_pnpm - pnpm format:check depends_on: - - install + - lint test: image: *node_image commands: - - *install_deps + - *enable_pnpm - pnpm test depends_on: - - install + - format build: image: *node_image commands: - - *install_deps + - *enable_pnpm - pnpm build depends_on: - - typecheck - - lint - - format - test