run sqlite tests in parallel (#331)

This commit is contained in:
tobi 2021-11-27 13:41:00 +01:00 committed by GitHub
parent ab316d2250
commit 5ed03480e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@ steps:
- name: go-src
path: /go
commands:
- CGO_ENABLED=0 GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test -p 1 ./...
- CGO_ENABLED=0 GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test ./...
when:
event:
include:
@ -115,6 +115,6 @@ trigger:
---
kind: signature
hmac: 07d6ed18510f9591c6b347d6768cbe8e613561b3759f1a8dda8721d1d231a522
hmac: 8a363baa3c7b5e581bd101a7774422042833b7d297faf5d93c9156cf54a31124
...

View File

@ -160,7 +160,7 @@ There are a few different ways of running tests. Each requires the use of the `-
If you want to run tests as quickly as possible, using an SQLite in-memory database, use:
```bash
GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test -p 1 ./...
GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test ./...
```
#### Postgres

View File

@ -7,7 +7,7 @@ set -e
# "./..." = all tests
# run tests with sqlite in-memory database
GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test -count 1 -p 1 ./...
GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test -count 1 ./...
# run tests with postgres database at either GTS_DB_ADDRESS or default localhost
GTS_DB_TYPE="postgres" GTS_DB_ADDRESS="${GTS_DB_ADDRESS:-localhost}" go test -count 1 -p 1 ./...