Begin mesh-delivery with its README and its own check (ADR 0428)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# mesh-delivery
|
||||
|
||||
Novox Mesh — delivery: the parts that build, check and deliver a change by watching and writing keys on the bus (ADR 0429).
|
||||
|
||||
Made by the mesh from the gitea module's config value `repositories` (novox/hq ADR 0428). Main takes no push: a change reaches it by a pull request whose `mesh/repo-check` (this repository's `merge-check.sh`) and `mesh/merge-gate` passed.
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# mesh-check-toolchain: go
|
||||
#
|
||||
# This repository's own check, mesh/repo-check (novox/hq ADR 0238 §4), written with its first commit (ADR 0428 §4):
|
||||
# every Go module in the tree is vetted, its unit tests run, and then its integration tests (-tags integration).
|
||||
# A tree with no Go module has nothing to test, and the check says so and passes.
|
||||
set -eu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
modules=$(find . -name go.mod -not -path '*/vendor/*' -not -path './.git/*' | sort)
|
||||
if [ -z "$modules" ]; then
|
||||
echo "This tree holds no Go module, so there are no tests to run; the check passes."
|
||||
exit 0
|
||||
fi
|
||||
for mod in $modules; do
|
||||
dir=$(dirname "$mod")
|
||||
echo "== $dir: go vet and the unit tests"
|
||||
(cd "$dir" && go vet ./... && go test ./...)
|
||||
echo "== $dir: the integration tests (-tags integration)"
|
||||
(cd "$dir" && go vet -tags integration ./... && go test -tags integration ./...)
|
||||
done
|
||||
Reference in New Issue
Block a user