Make lint and test phases of the Dockerfile (closes #96)
check / check (push) Successful in 1m40s
check / check (push) Successful in 1m40s
Follows the template: Dockerfile.lint is gone; the Dockerfile has a lint phase (eslint, prettier --check .) and a test phase (vitest, run as the node user, which the not-writable-directory tests need), and its last stage compiles and depends on both. script/lint and script/test build one phase each with --no-cache; script/docker and script/cibuild pass --no-cache, so CHECK_EPOCH and LINT_EPOCH are removed. script/cibuild is the single image build, so CI runs lint and the tests once each. The tests that checked the old layout are deleted, REPO_POLICIES.md is re-copied and the README describes the new layout. Model: opus-5-5
This commit is contained in:
+5
-13
@@ -1,19 +1,11 @@
|
||||
#!/bin/sh
|
||||
# script/check: run all checks (test, lint). Our own extension to
|
||||
# scripts-to-rule-them-all. Must not modify any files.
|
||||
# scripts-to-rule-them-all. Both are Docker phases. Must not modify any
|
||||
# files.
|
||||
#
|
||||
# The formatting check is part of lint, not a step of its own:
|
||||
# script/lint builds Dockerfile.lint, which runs eslint AND
|
||||
# `prettier --check .` as build steps. Calling script/fmt-check here as
|
||||
# well would run prettier a second time over the same tree for the same
|
||||
# verdict — the weaker of the two, since the host toolchain is whatever
|
||||
# the working tree happens to have installed while the container's is
|
||||
# digest-pinned. script/fmt-check remains a standalone entrypoint for
|
||||
# asking the formatting question by itself.
|
||||
#
|
||||
# script/lint builds Dockerfile.lint, so this script requires docker and
|
||||
# must never be run from inside a container: that is why the Dockerfile
|
||||
# image runs script/test and script/build rather than this.
|
||||
# script/fmt-check is not called here, unlike the template: the lint
|
||||
# phase already runs `prettier --check .`, so calling it would run
|
||||
# prettier a second time over the same tree for the same verdict.
|
||||
set -eu
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
||||
|
||||
Reference in New Issue
Block a user