mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2024-12-22 13:54:03 +01:00
run sqlite tests in parallel (#331)
This commit is contained in:
parent
ab316d2250
commit
5ed03480e7
@ -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
|
||||
|
||||
...
|
||||
|
@ -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
|
||||
|
@ -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 ./...
|
||||
|
Loading…
Reference in New Issue
Block a user