Files
stack/.woodpecker/ci.yml
Jarvis 41e8f91b2d
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed
fix(ci): decouple build/publish from test step — DB test requires external Postgres
2026-03-30 20:00:35 -05:00

99 lines
2.1 KiB
YAML

variables:
- &node_image 'node:22-alpine'
- &enable_pnpm 'corepack enable'
when:
- event: [push, pull_request, manual]
# Turbo remote cache (turbo.mosaicstack.dev) is configured via Woodpecker
# repository-level environment variables (TURBO_API, TURBO_TEAM, TURBO_TOKEN).
# This avoids from_secret which is blocked on pull_request events.
# If the env vars aren't set, turbo falls back to local cache only.
steps:
install:
image: *node_image
commands:
- corepack enable
- pnpm install --frozen-lockfile
typecheck:
image: *node_image
commands:
- *enable_pnpm
- pnpm typecheck
depends_on:
- install
# lint, format, and test are independent — run in parallel after typecheck
lint:
image: *node_image
commands:
- *enable_pnpm
- pnpm lint
depends_on:
- typecheck
format:
image: *node_image
commands:
- *enable_pnpm
- pnpm format:check
depends_on:
- typecheck
test:
image: *node_image
commands:
- *enable_pnpm
- pnpm test
depends_on:
- typecheck
build:
image: *node_image
commands:
- *enable_pnpm
- pnpm build
depends_on:
- lint
- format
publish-gateway:
image: woodpeckerci/plugin-docker-buildx
settings:
registry: git.mosaicstack.dev
repo: git.mosaicstack.dev/mosaic/mosaic-stack-gateway
dockerfile: docker/gateway.Dockerfile
tags:
- latest
- ${CI_COMMIT_SHA}
username:
from_secret: REGISTRY_USERNAME
password:
from_secret: REGISTRY_PASSWORD
when:
- event: push
branch: main
depends_on:
- build
publish-web:
image: woodpeckerci/plugin-docker-buildx
settings:
registry: git.mosaicstack.dev
repo: git.mosaicstack.dev/mosaic/mosaic-stack-web
dockerfile: docker/web.Dockerfile
tags:
- latest
- ${CI_COMMIT_SHA}
username:
from_secret: REGISTRY_USERNAME
password:
from_secret: REGISTRY_PASSWORD
when:
- event: push
branch: main
depends_on:
- build