.circleci: run tests parallelly

This commit is contained in:
Yousong Zhou
2020-06-15 17:29:10 +08:00
parent d4f54af5ad
commit bf1b1f48b0
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -55,6 +55,7 @@ jobs:
environment:
GO111MODULE: "on"
working_directory: /root/go/onecloud
parallelism: 4
steps:
- checkout
- restore_cache:
+3
View File
@@ -33,6 +33,9 @@ profile="${coverdir}/profile.out"
if [ -z "$pkgs" ]; then
pkgs="$(go list -mod vendor ./... | grep -vE 'host-image|hostimage')"
fi
if type circleci &>/dev/null; then
pkgs="$(echo "$pkgs" | circleci tests split)"
fi
echo "mode: $covermode" >"$profile"
echo "$pkgs" | xargs -n 8 --no-run-if-empty echo \