Build / Build (push) Successful in 45s
Owner decision 2026-10-17: the tests took about 22 of a release's 25 minutes on the runner (9 in build.yml after a push, 12 more in deploy.yml on the tag, for the same commit). PrivaPub.Tests is deleted with tools/ci/with-test-mongod.sh; build.yml builds and deploy.yml publishes. CLAUDE.md's Testing section becomes Verifying (build, run locally, the pasture), and the invariants no longer name the tests that checked them. decePubClient's tests/e2e goes too, so the pasture's peers/decepub.sh serves a plain publish with the Pasture environment (decePubClient/publish/wwwroot). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.4 KiB
Bash
30 lines
1.4 KiB
Bash
# decePubClient published with the Pasture environment (its API is then https://privapub.test), served like the
|
|
# production vhost (deploy/nginx in decePubClient): static files, the SPA fallback, nothing cached that must not be.
|
|
# In decePubClient: dotnet publish decePubClient.csproj -c Release -p:WasmApplicationEnvironmentName=Pasture -o publish
|
|
DECEPUB_SITE=${DECEPUB_SITE:-$repo/../decePubClient/publish/wwwroot}
|
|
|
|
decepub_up() {
|
|
[ -f "$DECEPUB_SITE/index.html" ] || { echo "no published decePub in $DECEPUB_SITE (publish it with WasmApplicationEnvironmentName=Pasture)" >&2; return 1; }
|
|
mkdir -p "$here/.state"
|
|
cat > "$here/.state/decepub.Caddyfile" <<'CADDY'
|
|
:80 {
|
|
root * /srv
|
|
header {
|
|
X-Content-Type-Options nosniff
|
|
Referrer-Policy strict-origin-when-cross-origin
|
|
X-Frame-Options SAMEORIGIN
|
|
}
|
|
@fresh path /index.html /appsettings.json /appsettings.Pasture.json /service-worker.js /service-worker-assets.js /build.json
|
|
header @fresh Cache-Control no-cache
|
|
try_files {path} /index.html
|
|
file_server {
|
|
precompressed br gzip
|
|
}
|
|
}
|
|
CADDY
|
|
podman run -d --replace --name pasture-decepub --network $net -v "$DECEPUB_SITE:/srv:z,ro" \
|
|
-v "$here/.state/decepub.Caddyfile:/etc/caddy/Caddyfile:z,ro" docker.io/library/caddy:2 >/dev/null
|
|
podman exec pasture-caddy caddy reload --config /etc/caddy/Caddyfile >/dev/null 2>&1 || true
|
|
echo "decepub: https://decepub.test:6443"
|
|
}
|