diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 18e01066b7..e36c685dcf 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -150,8 +150,15 @@ jobs: ENVFILTER: DATABRICKS_BUNDLE_ENGINE=${{ matrix.deployment }} run: go tool -modfile=tools/task/go.mod task cover - - name: Analyze slow tests - run: go tool -modfile=tools/task/go.mod task slowest + - name: Upload gotestsum JSON output + # Always upload so we can inspect timing even if tests fail. + if: ${{ always() }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: test-output-${{ matrix.os.name }}-${{ matrix.deployment }} + path: test-output.json + if-no-files-found: warn + retention-days: 7 - name: Check out.test.toml files are up to date run: | diff --git a/Taskfile.yml b/Taskfile.yml index c82f9e9848..38f690bd56 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -564,13 +564,15 @@ tasks: cover: desc: Run tests with coverage + generates: + - test-output.json cmds: - rm -fr ./acceptance/build/cover/ - | VERBOSE_TEST=1 {{.GO_TOOL}} gotestsum \ --format ${GOTESTSUM_FORMAT:-pkgname-and-test-fails} \ --no-summary=skipped \ - --jsonfile test-output.json \ + --jsonfile test-output-unit.json \ --rerun-fails \ --packages "{{.TEST_PACKAGES}}" \ -- -coverprofile=coverage.txt -timeout=${LOCAL_TIMEOUT:-30m} @@ -578,10 +580,11 @@ tasks: VERBOSE_TEST=1 CLI_GOCOVERDIR=build/cover {{.GO_TOOL}} gotestsum \ --format ${GOTESTSUM_FORMAT:-pkgname-and-test-fails} \ --no-summary=skipped \ - --jsonfile test-output.json \ + --jsonfile test-output-acc.json \ --rerun-fails \ --packages ./acceptance/... \ -- -timeout=${LOCAL_TIMEOUT:-30m}{{if .ACCEPTANCE_TEST_FILTER}} -run "{{.ACCEPTANCE_TEST_FILTER}}"{{end}} + - cat test-output-unit.json test-output-acc.json > test-output.json - rm -fr ./acceptance/build/cover-merged/ - mkdir -p acceptance/build/cover-merged/ - "go tool covdata merge -i $(printf '%s,' acceptance/build/cover/* | sed 's/,$//') -o acceptance/build/cover-merged/"