Merge pull request #2490 from filecoin-project/feat/gotestsum-json-arti

Update to newer gotestsum
This commit is contained in:
Łukasz Magiera 2020-07-21 02:21:22 +02:00 committed by GitHub
commit 0c7b3675d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ orbs:
executors: executors:
golang: golang:
docker: docker:
- image: circleci/golang:1.14.2 - image: circleci/golang:1.14.6
resource_class: 2xlarge resource_class: 2xlarge
ubuntu: ubuntu:
docker: docker:
@ -134,7 +134,7 @@ jobs:
description: Test suite name to report to CircleCI. description: Test suite name to report to CircleCI.
gotestsum-format: gotestsum-format:
type: string type: string
default: short default: pkgname-and-test-fails
description: gotestsum format. https://github.com/gotestyourself/gotestsum#format description: gotestsum format. https://github.com/gotestyourself/gotestsum#format
coverage: coverage:
type: string type: string
@ -160,18 +160,23 @@ jobs:
- run: - run:
name: go test name: go test
environment: environment:
GOTESTSUM_JUNITFILE: /tmp/test-reports/<< parameters.test-suite-name >>/junit.xml
GOTESTSUM_FORMAT: << parameters.gotestsum-format >>
LOTUS_TEST_WINDOW_POST: << parameters.winpost-test >> LOTUS_TEST_WINDOW_POST: << parameters.winpost-test >>
command: | command: |
mkdir -p /tmp/test-reports/<< parameters.test-suite-name >> mkdir -p /tmp/test-reports/<< parameters.test-suite-name >>
gotestsum -- \ mkdir -p /tmp/test-artifacts
gotestsum \
--format << parameters.gotestsum-format >> \
--junitfile /tmp/test-reports/<< parameters.test-suite-name >>/junit.xml \
--jsonfile /tmp/test-artifacts/<< parameters.test-suite-name >>.json \
-- \
<< parameters.coverage >> \ << parameters.coverage >> \
<< parameters.go-test-flags >> \ << parameters.go-test-flags >> \
<< parameters.packages >> << parameters.packages >>
no_output_timeout: 30m no_output_timeout: 30m
- store_test_results: - store_test_results:
path: /tmp/test-reports path: /tmp/test-reports
- store_artifacts:
path: /tmp/test-artifacts/<< parameters.test-suite-name >>.json
- when: - when:
condition: << parameters.codecov-upload >> condition: << parameters.codecov-upload >>
steps: steps:
@ -320,11 +325,14 @@ workflows:
- gofmt - gofmt
- test: - test:
codecov-upload: true codecov-upload: true
test-suite-name: full
- test-window-post: - test-window-post:
go-test-flags: "-run=TestWindowedPost" go-test-flags: "-run=TestWindowedPost"
winpost-test: "1" winpost-test: "1"
test-suite-name: window-post
- test-short: - test-short:
go-test-flags: "--timeout 10m --short" go-test-flags: "--timeout 10m --short"
test-suite-name: short
filters: filters:
tags: tags:
only: only: