ci: report per-route JavaScript budgets from Docker build

This commit is contained in:
Simo committed 2026-09-11 08:41:31 +02:00
1 parent 445ef13846
commit cc714b427a
9 files changed
+744 -1

No files matched your search

+16
View File
@@ -99,6 +99,22 @@ echo "Building $image"
DOCKER_BUILDKIT=1 docker build --network=host --progress=plain --cache-from epicnext-cms:latest \
--build-arg NEXT_DEPLOYMENT_ID="$sha" -t "$image" .
check_current
# Read reports from the already-built image; do not start an extra application.
report_container=""
if report_container="$(docker create --entrypoint /bin/true "$image")"; then
mkdir -p build-reports
if docker cp "$report_container:/app/build-reports/." build-reports; then
cat build-reports/report.md
if [ -n "${GITHUB_STEP_SUMMARY:-}" ]; then
cat build-reports/report.md >> "$GITHUB_STEP_SUMMARY"
fi
else
echo "Warning: build performance report unavailable" >&2
fi
docker rm "$report_container" >/dev/null
else
echo "Warning: could not extract build performance report" >&2
fi
pnpm db:migrate
check_current
+36
View File
@@ -0,0 +1,36 @@
{
"schemaVersion": 1,
"mode": "informational",
"routes": [
{
"route": "/me",
"maxInitialRawBytes": 890880,
"maxInitialGzipBytes": 276480
},
{
"route": "/news",
"maxInitialRawBytes": 880640,
"maxInitialGzipBytes": 276480
},
{
"route": "/events",
"maxInitialRawBytes": 890880,
"maxInitialGzipBytes": 276480
},
{
"route": "/search",
"maxInitialRawBytes": 890880,
"maxInitialGzipBytes": 276480
},
{
"route": "/admin/catalog",
"maxInitialRawBytes": 1904640,
"maxInitialGzipBytes": 573440
},
{
"route": "/admin/studio/furni",
"maxInitialRawBytes": 1433600,
"maxInitialGzipBytes": 450560
}
]
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff