mirror of https://github.com/coder/coder.git
chore: collect gotestsum TestEvents as workflow artifacts (#5336)
This commit is contained in:
parent
3cea5f96f0
commit
a973c35a02
|
@ -336,7 +336,14 @@ jobs:
|
||||||
echo ::set-output name=cover::false
|
echo ::set-output name=cover::false
|
||||||
fi
|
fi
|
||||||
set -x
|
set -x
|
||||||
gotestsum --junitfile="gotests.xml" --packages="./..." --debug -- -parallel=8 -timeout=3m -short -failfast $COVERAGE_FLAGS
|
gotestsum --junitfile="gotests.xml" --jsonfile="gotestsum.json" --packages="./..." --debug -- -parallel=8 -timeout=3m -short -failfast $COVERAGE_FLAGS
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
if: success() || failure()
|
||||||
|
with:
|
||||||
|
name: gotestsum-debug-${{ matrix.os }}.json
|
||||||
|
path: ./gotestsum.json
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v3
|
- uses: codecov/codecov-action@v3
|
||||||
# This action has a tendency to error out unexpectedly, it has
|
# This action has a tendency to error out unexpectedly, it has
|
||||||
|
@ -399,6 +406,13 @@ jobs:
|
||||||
- name: Test with PostgreSQL Database
|
- name: Test with PostgreSQL Database
|
||||||
run: make test-postgres
|
run: make test-postgres
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
if: success() || failure()
|
||||||
|
with:
|
||||||
|
name: gotestsum-debug-postgres.json
|
||||||
|
path: ./gotestsum.json
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v3
|
- uses: codecov/codecov-action@v3
|
||||||
# This action has a tendency to error out unexpectedly, it has
|
# This action has a tendency to error out unexpectedly, it has
|
||||||
# the `fail_ci_if_error` option that defaults to `false`, but
|
# the `fail_ci_if_error` option that defaults to `false`, but
|
||||||
|
|
|
@ -15,6 +15,7 @@ vendor
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
gotests.coverage
|
gotests.coverage
|
||||||
gotests.xml
|
gotests.xml
|
||||||
|
gotestsum.json
|
||||||
.idea
|
.idea
|
||||||
.gitpod.yml
|
.gitpod.yml
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -471,7 +471,10 @@ test: test-clean
|
||||||
test-postgres: test-clean test-postgres-docker
|
test-postgres: test-clean test-postgres-docker
|
||||||
# The postgres test is prone to failure, so we limit parallelism for
|
# The postgres test is prone to failure, so we limit parallelism for
|
||||||
# more consistent execution.
|
# more consistent execution.
|
||||||
DB=ci DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum --junitfile="gotests.xml" --packages="./..." -- \
|
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 \
|
-covermode=atomic -coverprofile="gotests.coverage" -timeout=20m \
|
||||||
-parallel=4 \
|
-parallel=4 \
|
||||||
-coverpkg=./... \
|
-coverpkg=./... \
|
||||||
|
|
Loading…
Reference in New Issue