Files
telemetry-client-js/.woodpecker.yml
Jason Woltje 9df760cab2
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
fix(#1): remove duplicate npm ci from parallel CI steps
Woodpecker shares the workspace volume across steps. Only the install
step should run npm ci — parallel steps (lint, typecheck, test, etc.)
were each re-running npm ci concurrently, corrupting node_modules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 22:47:06 -06:00

84 lines
1.7 KiB
YAML

when:
- event: [push, pull_request, manual]
variables:
- &node_image "node:22-alpine"
steps:
install:
image: *node_image
commands:
- corepack enable
- npm ci
lint:
image: *node_image
commands:
- npm run lint
depends_on:
- install
typecheck:
image: *node_image
commands:
- npm run typecheck
depends_on:
- install
format-check:
image: *node_image
commands:
- npm run format:check
depends_on:
- install
security-audit:
image: *node_image
commands:
- npm audit --audit-level=high
depends_on:
- install
test:
image: *node_image
commands:
- npm run test:coverage
depends_on:
- install
build:
image: *node_image
commands:
- npm run build
depends_on:
- lint
- typecheck
- format-check
- security-audit
- test
publish:
image: *node_image
environment:
GITEA_TOKEN:
from_secret: gitea_token
commands:
- npm run build
- |
echo "//git.mosaicstack.dev/api/packages/mosaic/npm/:_authToken=$$GITEA_TOKEN" > .npmrc
echo "@mosaicstack:registry=https://git.mosaicstack.dev/api/packages/mosaic/npm/" >> .npmrc
- |
CURRENT=$(node -p "require('./package.json').version")
PUBLISHED=$(npm view @mosaicstack/telemetry-client version 2>/dev/null || echo "0.0.0")
if [ "$$CURRENT" = "$$PUBLISHED" ]; then
echo "Version $$CURRENT already published, skipping"
exit 0
fi
echo "Publishing $$CURRENT (was $$PUBLISHED)"
npm publish --access public
when:
- branch: [main, develop]
event: [push, manual, tag]
depends_on:
- build