File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# CI for the xata-cli mirror.
22#
33# Verifies the standalone mirror builds from source using only its committed
4- # lockfile and packages published to npm — the guarantee tracked in xataio/cli#2.
5- # The monorepo's mirror sync regenerates pnpm-lock.yaml on every push, so
6- # `--frozen-lockfile` here proves the committed lockfile stays in sync.
4+ # lockfile and packages published to npm. The monorepo's mirror sync regenerates
5+ # pnpm-lock.yaml on every push, so `--frozen-lockfile` here proves the committed
6+ # lockfile stays in sync.
77#
88# Maintained directly in this repo (.github is not part of the synced subtree).
99name : CI
@@ -36,11 +36,22 @@ jobs:
3636 - name : Install (frozen lockfile)
3737 run : pnpm install --frozen-lockfile
3838
39- - name : Typecheck
40- run : pnpm run tsc
41-
42- - name : Build
43- run : pnpm run build
44-
45- - name : Unit tests
46- run : pnpm run test-unit
39+ - name : Run package checks
40+ run : |
41+ run_if_present() {
42+ local script="$1"
43+ if node -e "process.exit(require('./package.json').scripts?.[process.argv[1]] ? 0 : 1)" "$script"; then
44+ pnpm run "$script"
45+ else
46+ echo "Skipping missing script: $script"
47+ fi
48+ }
49+
50+ run_if_present tsc
51+ run_if_present build
52+
53+ if node -e "process.exit(require('./package.json').scripts?.['test-unit'] ? 0 : 1)"; then
54+ pnpm run test-unit
55+ else
56+ run_if_present test
57+ fi
You can’t perform that action at this time.
0 commit comments