build(hack): wire bats unit tests into make unit-tests target

Add a bats-unit-tests Make target that runs hack/cozytest.sh against
hack/check-host-runtime.bats, and make unit-tests depend on it so the
existing CI step (make unit-tests in .github/workflows/pull-requests.yaml)
exercises the preflight script on every PR. Without this the bats file
exists in the tree but is never executed, leaving future regressions
undetected.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
Aleksei Sviridkin 2026-04-11 14:11:40 +03:00
parent 7c822166d8
commit 7b1364e00b
No known key found for this signature in database
GPG key ID: 7988329FDF395282

View file

@ -1,4 +1,4 @@
.PHONY: manifests assets unit-tests helm-unit-tests
.PHONY: manifests assets unit-tests helm-unit-tests bats-unit-tests
include hack/common-envs.mk
@ -82,11 +82,14 @@ test:
make -C packages/core/testing apply
make -C packages/core/testing test
unit-tests: helm-unit-tests
unit-tests: helm-unit-tests bats-unit-tests
helm-unit-tests:
hack/helm-unit-tests.sh
bats-unit-tests:
hack/cozytest.sh hack/check-host-runtime.bats
prepare-env:
make -C packages/core/testing apply
make -C packages/core/testing prepare-cluster