1
0
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:
Josh Curl 2016-04-13 11:23:21 -07:00
parent b52663ee5f
commit adb8ad3e3a
2 changed files with 9 additions and 0 deletions

View File

@ -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
View 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