mirror of https://github.com/coder/coder.git
chore: Update gotestsum to v1.9.0 and remove debugging (#5726)
* chore: Update gotestsum to v1.9.0 and remove debugging * chore: Update cloud.google.gpg to fix dogfood build
This commit is contained in:
parent
1d777c41f2
commit
f3bbf627a3
|
@ -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()
|
||||
|
|
3
Makefile
3
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 \
|
||||
|
|
|
@ -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 && \
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue