Created
September 16, 2019 18:00
-
-
Save roopakv/cf217e3f4585cd82733ab0ef63bb01d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commands: | |
make-check: | |
description: Runs tests | |
steps: | |
- restore_cache: | |
keys: | |
- go-mod-1-13-v1-{{ checksum "go.mod" }}-{{ checksum "go.sum" }} | |
- go-mod-1-13-v1-{{ checksum "go.mod" }} | |
- go-mod-1-13-v1- | |
- run: | |
name: Go tests for hail | |
shell: /bin/bash | |
command: | | |
set -e | |
cd /home/circleci/project/ | |
# Improve sharding: https://github.com/golang/go/issues/33527 | |
PACKAGES="$(go list ./... | circleci tests split --split-by=timings --timings-type=classname)" | |
export PACKAGE_NAMES=$(echo $PACKAGES | tr -d '\n') | |
export BUILD_NUM=$CIRCLE_BUILD_NUM | |
export SHA1=$CIRCLE_SHA1 | |
echo "Testing the following packages:" | |
echo $PACKAGE_NAMES | |
gotestsum --junitfile $ARTIFACTS_DIR/report.xml -- -covermode=count -coverprofile=$ARTIFACTS_DIR/coverage_tmp.out -p 1 $PACKAGE_NAMES | |
- save_cache: | |
key: go-mod-1-13-v1-{{ checksum "go.mod" }}-{{ checksum "go.sum" }} | |
paths: | |
- "/go/pkg/mod" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment