diff --git a/.circleci/test-suites.yml b/.circleci/test-suites.yml deleted file mode 100644 index f95f301ca..000000000 --- a/.circleci/test-suites.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: ci tests -discover: go list -f '{{ if or (len .TestGoFiles) (len .XTestGoFiles) }} {{ .ImportPath }} {{end}}' ./... github.com/CircleCI-Public/circleci-cli/clikit/... -run: go tool -modfile tools/go.mod gotestsum --junitfile="<< outputs.junit >>" -- -race -count=1 << test.atoms >> -outputs: - junit: test-reports/result.xml ---- -name: windows tests -discover: go list -f '{{ if or (len .TestGoFiles) (len .XTestGoFiles) }} {{ .ImportPath }} {{end}}' ./... github.com/CircleCI-Public/circleci-cli/clikit/... -run: go tool -modfile tools/go.mod gotestsum --junitfile="<< outputs.junit >>" -- -count=1 << test.atoms >> -outputs: - junit: test-reports/result.xml diff --git a/Taskfile.yml b/Taskfile.yml index 2209a2e6c..28ea1834a 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -367,12 +367,15 @@ tasks: --output.text.path=stdout --output.text.colors=true ci:test: - desc: Run tests with JUnit output + desc: Run the tests and output the test results + # Same package set as `task test` — clikit is a separate module, so ./... + # does not reach it and it has to be named by module path. vars: - NAME: '{{if not (eq OS "windows")}}ci tests{{else}}windows tests{{end}}' + ARGS: '{{default "./... github.com/CircleCI-Public/circleci-cli/clikit/..." .CLI_ARGS}}' + RACE: '{{if not (eq OS "windows")}}-race{{end}}' cmds: - mkdir -p {{.RESULTS_DIR}} - - circleci testsuite "{{.NAME}}" + - go tool -modfile tools/go.mod gotestsum --junitfile="{{.TEST_REPORT}}" -- {{.RACE}} -count=1 {{.ARGS}} ci:check: desc: Check no uncommitted diffs after generate/fmt/tidy