Skip to content

Commit c1384f1

Browse files
Merge pull request #1603 from CircleCI-Public/liam/testsuite
Add testsuite to CI
2 parents 8b5ac3d + df61615 commit c1384f1

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

.circleci/test-suites.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: ci tests
2+
discover: go list -f '{{ if or (len .TestGoFiles) (len .XTestGoFiles) }} {{ .ImportPath }} {{end}}' ./...
3+
run: go tool -modfile tools/go.mod gotestsum --junitfile="<< outputs.junit >>" -- -race -count=1 << test.atoms >>
4+
outputs:
5+
junit: test-reports/result.xml
6+
---
7+
name: windows tests
8+
discover: go list -f '{{ if or (len .TestGoFiles) (len .XTestGoFiles) }} {{ .ImportPath }} {{end}}' ./...
9+
run: go tool -modfile tools/go.mod gotestsum --junitfile="<< outputs.junit >>" -- -count=1 << test.atoms >>
10+
outputs:
11+
junit: test-reports/result.xml

Taskfile.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,10 @@ tasks:
299299
ci:test:
300300
desc: Run tests with JUnit output
301301
vars:
302-
ARGS: '{{default "./..." .CLI_ARGS}}'
303-
RACE: '{{if not (eq OS "windows")}}-race{{end}}'
302+
NAME: '{{if not (eq OS "windows")}}ci tests{{else}}windows tests{{end}}'
304303
cmds:
305304
- mkdir -p {{.RESULTS_DIR}}
306-
- go tool -modfile tools/go.mod gotestsum --junitfile="{{.TEST_REPORT}}" -- {{.RACE}} -count=1 {{.ARGS}}
305+
- circleci testsuite "{{.NAME}}"
307306

308307
ci:check:
309308
desc: Check no uncommitted diffs after generate/fmt/tidy

0 commit comments

Comments
 (0)