Skip to content

chore: collect gotestsum TestEvents as workflow artifacts #5336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: collect gotestsum TestEvents as workflow artifacts
  • Loading branch information
mtojek committed Dec 7, 2022
commit 35ad9f986752a0933616b99f15d7dccc267e8c25
16 changes: 15 additions & 1 deletion .github/workflows/coder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,14 @@ jobs:
echo ::set-output name=cover::false
fi
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
# This action has a tendency to error out unexpectedly, it has
Expand Down Expand Up @@ -399,6 +406,13 @@ jobs:
- name: Test with PostgreSQL Database
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
# This action has a tendency to error out unexpectedly, it has
# the `fail_ci_if_error` option that defaults to `false`, but
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ vendor
yarn-error.log
gotests.coverage
gotests.xml
gotestsum.json
.idea
.gitpod.yml
.DS_Store
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,10 @@ test: test-clean
test-postgres: test-clean test-postgres-docker
# The postgres test is prone to failure, so we limit parallelism for
# 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 \
-parallel=4 \
-coverpkg=./... \
Expand Down