Fix cockroachdb test build.

This commit is contained in:
go-jet 2025-02-14 14:10:29 +01:00
parent 00b8155f74
commit de3e912872
2 changed files with 52 additions and 42 deletions

View file

@ -140,13 +140,20 @@ jobs:
- run:
name: Running tests
command: gotestsum --junitfile $TEST_RESULTS/report.xml --format testname -- -coverprofile=cover.out -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/...,github.com/go-jet/jet/v2/stmtcache/... ./...
command: gotestsum --junitfile $TEST_RESULTS/report.xml --format testname -- -tags postgres -coverprofile=cover.out -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/...,github.com/go-jet/jet/v2/stmtcache/... ./...
- run:
name: Running tests with statement caching enabled
command: JET_TESTS_WITH_STMT_CACHE=true go test -v ./tests/...
command: JET_TESTS_WITH_STMT_CACHE=true go test -tags postgres -v ./tests/...
# run mariaDB and cockroachdb tests. No need to collect coverage, because coverage is already included with mysql and postgres tests
- run:
name: Jet generate mariadb and cockroachdb
command: |
cd tests
make jet-gen-mariadb
make jet-gen-cockroach
- run: MY_SQL_SOURCE=MariaDB go test -v ./tests/mysql/
- run: PG_SOURCE=COCKROACH_DB go test -v ./tests/postgres/