Test both dbs (#205)

* move scripts, allow testing both dbs with one cmd

* tidy + vendor

* update test.sh to ignore cache

* put test commands directly in drone.yml

* change CONTRIBUTING slightly

* go ham on the readme
This commit is contained in:
tobi 2021-09-10 18:13:24 +02:00 committed by GitHub
commit 64bd689e55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 337 additions and 196 deletions

View file

@ -31,12 +31,9 @@ steps:
volumes:
- name: go-build-cache
path: /root/.cache/go-build
environment:
GTS_DB_ADDRESS: postgres
commands:
# `-p 1` => run maximum one test at a time
# `./...` => run all tests
- go test -p 1 ./...
- GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test -count 1 -p 1 ./...
- GTS_DB_TYPE="postgres" GTS_DB_ADDRESS="postgres" go test -count 1 -p 1 ./...
when:
event:
include:
@ -85,6 +82,6 @@ trigger:
---
kind: signature
hmac: 268d484fd9c5d14834a3e2a1e39cfe605c3898d601d2969dba5c2e11c1ea2f3b
hmac: 764ac2de691c436bd86c6cc94b862cde2b5558e4de65ff68bb0d227de1736783
...