Files

22 lines
748 B
YAML

# Hanzo CI/CD. Packages, not images: the gate is each package's typecheck, design
# lint, tests and build, and npm is where they ship (.github/workflows/publish.yml).
test:
- name: build
run: |
set -e
corepack enable
pnpm install --frozen-lockfile
pnpm build
pnpm typecheck
pnpm lint:design
for dir in pkg/*/; do
[ -f "${dir}package.json" ] || continue
(cd "$dir" && npx vitest run)
done
# Each package's root loads in plain Node, as publish.yml checks before it ships.
for dir in pkg/*/; do
test -s "${dir}dist/index.js"
test -s "${dir}dist/index.d.ts"
(cd "$dir" && node --input-type=module -e "await import('./dist/index.js')")
done