Skip to content

Commit

Permalink
Trying out gotestsum as an alternative
Browse files Browse the repository at this point in the history
  • Loading branch information
safaci2000 committed Oct 10, 2024
1 parent d7ca1b5 commit 85bff09
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,20 @@ jobs:
name: Install go-junit-report
command: go install github.com/jstemmer/go-junit-report@latest

- run:
name: Install gotestsum
command: go install gotest.tools/gotestsum@latest
- run: mkdir -p $TEST_RESULTS

# this will run all tests and exclude test files from code coverage report
- run: |
go test -v ./... \
-covermode=atomic \
-coverpkg=github.com/go-jet/jet/v2/postgres/...,github.com/go-jet/jet/v2/mysql/...,github.com/go-jet/jet/v2/sqlite/...,github.com/go-jet/jet/v2/qrm/...,github.com/go-jet/jet/v2/generator/...,github.com/go-jet/jet/v2/internal/... \
-coverprofile=cover.out 2>&1 | go-junit-report > $TEST_RESULTS/results.xml
- run:
name: Running tests
command: gotestsum --junitfile report.xml --format testname
#- run: |
# go test -v ./... \
# -covermode=atomic \
# -coverpkg=github.com/go-jet/jet/v2/postgres/...,github.com/go-jet/jet/v2/mysql/...,github.com/go-jet/jet/v2/sqlite/...,github.com/go-jet/jet/v2/qrm/...,github.com/go-jet/jet/v2/generator/...,github.com/go-jet/jet/v2/internal/... \
# -coverprofile=cover.out 2>&1 | go-junit-report > $TEST_RESULTS/results.xml

# run mariaDB and cockroachdb tests. No need to collect coverage, because coverage is already included with mysql and postgres tests
- run: MY_SQL_SOURCE=MariaDB go test -v ./tests/mysql/
Expand Down

0 comments on commit 85bff09

Please sign in to comment.