Skip to content

Commit a591563

Browse files
committed
added go-test step
1 parent cebfae8 commit a591563

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.circleci/config.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,22 @@ jobs:
4343
fi
4444
- run: go vet ./...
4545

46+
go-test:
47+
executor: go
48+
steps:
49+
- checkout
50+
- run: mkdir -p $TEST_RESULTS
51+
- restore_cache: # restore cache from dev-build job
52+
keys:
53+
- go-getter-modcache-v1-{{ checksum "go.mod" }}
54+
- run: |
55+
PACKAGE_NAMES=$(go list ./...)
56+
gotestsum --format=short-verbose --junitfile $TEST_RESULTS/gotestsum-report.xml -- $PACKAGE_NAMES
57+
- store_test_results:
58+
path: /tmp/test-results
59+
- store_artifacts:
60+
path: /tmp/test-results
61+
4662
go-build:
4763
executor: go
4864
steps:
@@ -57,6 +73,9 @@ workflows:
5773
test-and-build:
5874
jobs:
5975
- go-fmt-and-vet
76+
- go-test:
77+
requires:
78+
- go-fmt-and-vet
6079
- go-build:
6180
requires:
6281
- go-fmt-and-vet

0 commit comments

Comments
 (0)