Deploy: add snapshot-tests step to git-mode (was rsync-only)
/reports/live/tests was showing "last run 2026-05-10 · 17 runs cumulative" on 2026-05-22 because the git-mode deploy never invoked snapshot-tests.ts — only the rsync escape hatch did. So every deploy since the rsync→git switch silently skipped the test snapshot. Add the step via podman run on the existing image, symlinking the container's /app/node_modules into /work so `bun test` can resolve marked + node-html-parser without re-installing per deploy. Verification: /reports/live/tests now reads "last run 2026-05-22 · 18 runs cumulative" (snapshot file mtime ~2 min after deploy). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 file changed · +7 −0
scripts/p620/deploy-tdd-md.sh
+7
−0
| @@ -157,6 +157,13 @@ if [[ "$MODE" == "git" ]]; then | ||
| 157 | 157 | ssh "$SSH_HOST" "podman run --rm -v \$HOME/$REMOTE_SRC_DIR:/work:Z --workdir /work $IMAGE_TAG bun scripts/p620/snapshot-git-history.ts" \ |
| 158 | 158 | || { echo "✗ snapshot-git-history failed"; exit 1; } |
| 159 | 159 | |
| 160 | + echo "→ snapshot tests via podman run → content/git-history/" | |
| 161 | + # bun test needs node_modules; the image bakes them at /app/node_modules. | |
| 162 | + # Symlink them into /work so the script's bun test resolves marked, | |
| 163 | + # node-html-parser, etc. without re-installing per deploy. | |
| 164 | + ssh "$SSH_HOST" "podman run --rm -v \$HOME/$REMOTE_SRC_DIR:/work:Z --workdir /work --entrypoint sh $IMAGE_TAG -c 'ln -sfn /app/node_modules node_modules && bun scripts/p620/snapshot-tests.ts'" \ | |
| 165 | + || { echo "✗ snapshot-tests failed"; exit 1; } | |
| 166 | + | |
| 160 | 167 | echo "→ bundle sama CLI via podman run → public/sama-cli" |
| 161 | 168 | ssh "$SSH_HOST" "podman run --rm -v \$HOME/$REMOTE_SRC_DIR:/work:Z --workdir /work --entrypoint sh $IMAGE_TAG -c 'bun build scripts/sama-cli.ts --target=bun --outfile=public/sama-cli >/dev/null && chmod +x public/sama-cli'" \ |
| 162 | 169 | || { echo "✗ sama-cli bundle failed"; exit 1; } |