Merge pull request #8270 from hashicorp/dnephin/oss-store-jsonfile

ci: Store a jsonfile for go-test and go-test-api
This commit is contained in:
Daniel Nephin 2020-07-09 14:17:51 -04:00 committed by GitHub
commit fe59cff384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -106,10 +106,12 @@ jobs:
name: go test
command: |
mkdir -p $TEST_RESULTS_DIR
PACKAGE_NAMES=$(go list ./... | circleci tests split --split-by=timings --timings-type=classname)
mkdir -p $TEST_RESULTS_DIR /tmp/jsonfile
PACKAGE_NAMES=$(go list -tags "$GOTAGS" ./... | circleci tests split --split-by=timings --timings-type=classname)
echo "Running $(echo $PACKAGE_NAMES | wc -w) packages"
echo $PACKAGE_NAMES
gotestsum --format=short-verbose \
--jsonfile /tmp/jsonfile/go-test-${CIRCLE_NODE_INDEX}.log \
--junitfile $TEST_RESULTS_DIR/gotestsum-report.xml -- \
-tags="$GOTAGS" -p 2 \
-cover -coverprofile=coverage.txt \
@ -119,6 +121,8 @@ jobs:
path: *TEST_RESULTS_DIR
- store_artifacts:
path: *TEST_RESULTS_DIR
- store_artifacts:
path: /tmp/jsonfile
- run: &codecov_upload
name: codecov upload
when: always
@ -145,9 +149,10 @@ jobs:
working_directory: api
name: go test
command: |
mkdir -p $TEST_RESULTS_DIR
mkdir -p $TEST_RESULTS_DIR /tmp/jsonfile
gotestsum \
--format=short-verbose \
--jsonfile /tmp/jsonfile/go-test-api.log \
--junitfile $TEST_RESULTS_DIR/gotestsum-report.xml -- \
-tags="$GOTAGS" -cover -coverprofile=coverage.txt \
./...
@ -156,6 +161,8 @@ jobs:
path: *TEST_RESULTS_DIR
- store_artifacts:
path: *TEST_RESULTS_DIR
- store_artifacts:
path: /tmp/jsonfile
- run: *codecov_upload
# split off a job for the SDK package since it is separate