diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index c5924dfe12..37ce3bd17e 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -320,7 +320,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: repo: gotestyourself/gotestsum - tag: v1.8.2 + tag: v1.9.0 - uses: hashicorp/setup-terraform@v2 with: @@ -340,30 +340,8 @@ jobs: else echo ::set-output name=cover::false fi - set +e - gotestsum --junitfile="gotests.xml" --jsonfile="gotestsum.json" --packages="./..." --debug -- -parallel=8 -timeout=5m -short -failfast $COVERAGE_FLAGS - ret=$? - if ((ret)); then - # Eternalize test timeout logs because "re-run failed" erases - # artifacts and gotestsum doesn't always capture it: - # https://github.com/gotestyourself/gotestsum/issues/292 - # Multiple test packages could've failed, each one may or may - # not run into the edge case. PS. Don't summon ShellCheck here. - for testWithStack in $(grep 'panic: test timed out' gotestsum.json | grep -E -o '("Test":[^,}]*)'); do - if [ -n "$testWithStack" ] && grep -q "${testWithStack}.*PASS" gotestsum.json; then - echo "Conditions met for gotestsum stack trace missing bug, outputting panic trace:" - grep -A 999999 "${testWithStack}.*panic: test timed out" gotestsum.json - fi - done - fi - exit $ret - - uses: actions/upload-artifact@v3 - if: success() || failure() - with: - name: gotestsum-debug-${{ matrix.os }}.json - path: ./gotestsum.json - retention-days: 7 + gotestsum --junitfile="gotests.xml" --packages="./..." -- -parallel=8 -timeout=5m -short -failfast $COVERAGE_FLAGS - uses: actions/upload-artifact@v3 if: success() || failure() @@ -423,7 +401,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: repo: gotestyourself/gotestsum - tag: v1.8.2 + tag: v1.9.0 - uses: hashicorp/setup-terraform@v2 with: @@ -432,30 +410,7 @@ jobs: - name: Test with PostgreSQL Database run: | - set +e make test-postgres - ret=$? - if ((ret)); then - # Eternalize test timeout logs because "re-run failed" erases - # artifacts and gotestsum doesn't always capture it: - # https://github.com/gotestyourself/gotestsum/issues/292 - # Multiple test packages could've failed, each one may or may - # not run into the edge case. PS. Don't summon ShellCheck here. - for testWithStack in $(grep 'panic: test timed out' gotestsum.json | grep -E -o '("Test":[^,}]*)'); do - if [ -n "$testWithStack" ] && grep -q "${testWithStack}.*PASS" gotestsum.json; then - echo "Conditions met for gotestsum stack trace missing bug, outputting panic trace:" - grep -A 999999 "${testWithStack}.*panic: test timed out" gotestsum.json - fi - done - fi - exit $ret - - - uses: actions/upload-artifact@v3 - if: success() || failure() - with: - name: gotestsum-debug-postgres.json - path: ./gotestsum.json - retention-days: 7 - uses: actions/upload-artifact@v3 if: success() || failure() diff --git a/Makefile b/Makefile index cd7c316a4e..1d10189b40 100644 --- a/Makefile +++ b/Makefile @@ -556,7 +556,7 @@ site/.eslintignore site/.prettierignore: .prettierignore Makefile done < "$<" test: test-clean - gotestsum --debug -- -v -short ./... + gotestsum -- -v -short ./... .PHONY: test # When updating -timeout for this test, keep in sync with @@ -566,7 +566,6 @@ test-postgres: test-clean test-postgres-docker # more consistent execution. DB=ci DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum \ --junitfile="gotests.xml" \ - --jsonfile="gotestsum.json" \ --packages="./..." -- \ -covermode=atomic -coverprofile="gotests.coverage" -timeout=20m \ -parallel=4 \ diff --git a/dogfood/Dockerfile b/dogfood/Dockerfile index 34c53d761b..2088598841 100644 --- a/dogfood/Dockerfile +++ b/dogfood/Dockerfile @@ -43,7 +43,7 @@ RUN mkdir --parents "$GOPATH" && \ # the language server protocol go install golang.org/x/tools/gopls@latest && \ # gotestsum makes test output more readable - go install gotest.tools/gotestsum@v1.7.0 && \ + go install gotest.tools/gotestsum@v1.9.0 && \ # goveralls collects code coverage metrics from tests # and sends to Coveralls go install github.com/mattn/goveralls@v0.0.11 && \ diff --git a/dogfood/files/usr/share/keyrings/google-cloud.gpg b/dogfood/files/usr/share/keyrings/google-cloud.gpg index 3f0b5a850b..0f478144f1 100644 Binary files a/dogfood/files/usr/share/keyrings/google-cloud.gpg and b/dogfood/files/usr/share/keyrings/google-cloud.gpg differ