Repository navigation
feat(netlify): run a baseline check on every site - #186
Merged
Merged
Conversation
added 2 commits
October 6, 2026 13:50
netlify-site-checks.yml now runs netlify/baseline-check.sh against the deploy URL for every caller, before the caller's own check script. It fails unless GET / returns 200 (redirects followed, bounded timeout and retries) with a body of at least 1024 bytes that contains a <title> element. The check-script decision moves into netlify/select-check-script.sh, still run before the 10-minute wait: - default path (scripts/check-deploy-preview.sh) absent: skipped with a notice, so a site with no script of its own (crazy-larry) gets the baseline check alone, with no caller change; - any other path absent: fails with exit 2, to catch a typo; - present but not executable: fails with exit 2, as before. tests/test-baseline-check.sh covers both scripts against a stub curl, and pins the selector's default to the workflow input default. Advances smartwatermelon/dev-env#193
_tmp ran inside a command substitution, so its append to tmp_dirs was lost and the EXIT trap removed nothing. Fixtures now live under one parent dir that the trap removes.
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
netlify-site-checks.ymlnow runs a built-in baseline check on everysite, before the caller's own check script. A Netlify site with no check
script (smartwatermelon/crazy-larry) now gets checked too, and its caller
needs no change.
netlify/baseline-check.sh <base-url>:GET /must return 200(redirects followed; 10s connect timeout, 30s max, 2 retries). The body
must be at least 1024 bytes and contain a
<title>element. It printsok:/FAIL:lines. Exit 0 = sane, 1 = not, 2 = usage.netlify/select-check-script.shmakes the check-script decision. Itstill runs before the 10-minute wait:
scripts/check-deploy-preview.sh) is absent: thescript is skipped with a
::notice::, and only the baseline check runs.before.
The selector cannot tell a default left in place from the default path
passed explicitly, so both get the skip. The README says so. A test pins
the selector's hard-coded default to the workflow input's default, so the
two cannot drift apart.
Testing
bash tests/run-tests.sh: all 7 files pass. The newtests/test-baseline-check.shpasses 15/15 against a stubcurlintests/stub-baseline/. It covers pass, non-200, connection failure,short body, missing title, usage errors, and the four selector outcomes.
the short-body and missing-title cases fail as they should.
shellcheck -S infois clean on every new script. zizmor reports nofindings. actionlint reports one finding,
job.workflow_shaunknown onan unchanged line. The same finding appears on main and in
standards-check.yml, so it predates this change.Release
This change reaches callers only after a release, and both steps need
Andrew's authorization:
netlify-site-checks-v1.1.0on the merge commit.netlify-site-checks-v1tag to it.This PR creates and moves no tags.
Advances smartwatermelon/dev-env#193