Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
68 lines
1.3 KiB
YAML
68 lines
1.3 KiB
YAML
# Woodpecker CI Quality Enforcement Pipeline - Monorepo
|
|
when:
|
|
- event: [push, pull_request, manual]
|
|
|
|
variables:
|
|
- &node_image "node:20-alpine"
|
|
- &install_deps |
|
|
corepack enable
|
|
npm ci --ignore-scripts
|
|
|
|
steps:
|
|
install:
|
|
image: *node_image
|
|
commands:
|
|
- *install_deps
|
|
|
|
security-audit:
|
|
image: *node_image
|
|
commands:
|
|
- *install_deps
|
|
- npm audit --audit-level=high
|
|
depends_on:
|
|
- install
|
|
|
|
lint:
|
|
image: *node_image
|
|
environment:
|
|
SKIP_ENV_VALIDATION: "true"
|
|
commands:
|
|
- *install_deps
|
|
- npm run lint
|
|
depends_on:
|
|
- install
|
|
|
|
typecheck:
|
|
image: *node_image
|
|
environment:
|
|
SKIP_ENV_VALIDATION: "true"
|
|
commands:
|
|
- *install_deps
|
|
- npm run type-check
|
|
depends_on:
|
|
- install
|
|
|
|
test:
|
|
image: *node_image
|
|
environment:
|
|
SKIP_ENV_VALIDATION: "true"
|
|
commands:
|
|
- *install_deps
|
|
- npm run test -- --coverage --coverageThreshold='{"global":{"branches":80,"functions":80,"lines":80,"statements":80}}'
|
|
depends_on:
|
|
- install
|
|
|
|
build:
|
|
image: *node_image
|
|
environment:
|
|
SKIP_ENV_VALIDATION: "true"
|
|
NODE_ENV: "production"
|
|
commands:
|
|
- *install_deps
|
|
- npm run build
|
|
depends_on:
|
|
- lint
|
|
- typecheck
|
|
- test
|
|
- security-audit
|