mirror of
https://github.com/rancher/os.git
synced 2025-07-31 06:32:09 +00:00
Add unit tests to CI
This commit is contained in:
parent
b52663ee5f
commit
adb8ad3e3a
1
Makefile
1
Makefile
@ -71,6 +71,7 @@ minimal: initrd dist/artifacts/vmlinuz
|
||||
iso: dist/artifacts/rancheros.iso dist/artifacts/iso-checksums.txt
|
||||
|
||||
test: minimal
|
||||
./scripts/unit-test
|
||||
cd tests/integration && HOST_ARCH=$(HOST_ARCH) ARCH=$(ARCH) tox
|
||||
|
||||
.PHONY: all minimal initrd iso installer test
|
||||
|
8
scripts/unit-test
Executable file
8
scripts/unit-test
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd $(dirname $0)/..
|
||||
|
||||
PACKAGES="$(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor)' | sed -e 's!^!./!' -e 's!$!/...!')"
|
||||
|
||||
go test -race -cover -tags=test $PACKAGES
|
Loading…
Reference in New Issue
Block a user