Files
WolfandClaude Opus 5.5 515d2250fc Deploy from a WSL checkout, from boilerplate 1679e88
When the checkout lives under \\wsl.localhost, step 1 runs its tests in the
distro through deploy/test-commit.sh and db.ps1 push makes its snapshot
there, because the .venv is a Linux one. pipeline/context.py narrows by
sys.platform so mypy passes on Linux. See boilerplate docs/wsl.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 19:43:50 +02:00

19 lines
817 B
Bash

#!/bin/sh
# Test one commit in a throwaway worktree, with the checkout's Linux .venv.
# 1-test-and-promote.ps1 runs this through wsl.exe when the checkout lives
# inside WSL, where the .venv has no Windows python.exe to call. The gates are
# the same as in that script; keep the two lists in step.
# Usage: sh deploy/test-commit.sh <commit> (from the checkout root)
set -eu
root=$(pwd)
python="$root/.venv/bin/python"
[ -x "$python" ] || { echo "no interpreter at $python - run uv sync" >&2; exit 1; }
base=$(mktemp -d /tmp/test-commit-XXXXXXXX)
tree="$base/tree"
trap 'git -C "$root" worktree remove --force "$tree" 2>/dev/null; rm -rf "$base"' EXIT
git worktree add --detach "$tree" "$1" >/dev/null
cd "$tree"
"$python" -m pytest -q
# "$python" -m ruff check .
# "$python" -m mypy --cache-dir "$root/.mypy_cache"