ci: run PostgreSQL tests
This commit is contained in:
parent
1cd99ce2f7
commit
96d4111be2
13
.build.yml
13
.build.yml
@ -2,11 +2,22 @@ image: alpine/edge
|
|||||||
packages:
|
packages:
|
||||||
- go
|
- go
|
||||||
- scdoc
|
- scdoc
|
||||||
|
- postgresql
|
||||||
sources:
|
sources:
|
||||||
- https://git.sr.ht/~emersion/soju
|
- https://git.sr.ht/~emersion/soju
|
||||||
tasks:
|
tasks:
|
||||||
- build: |
|
- build: |
|
||||||
cd soju
|
cd soju
|
||||||
go test -v ./...
|
go build -v ./...
|
||||||
scdoc <doc/soju.1.scd >/dev/null
|
scdoc <doc/soju.1.scd >/dev/null
|
||||||
|
- setup-postgresql: |
|
||||||
|
sudo /etc/init.d/postgresql start
|
||||||
|
sudo -u postgres -- createuser "$USER"
|
||||||
|
sudo -u postgres -- createdb soju
|
||||||
|
- test: |
|
||||||
|
cd soju
|
||||||
|
export SOJU_TEST_POSTGRES="host=/run/postgresql dbname=soju"
|
||||||
|
go test -v ./...
|
||||||
|
- gofmt: |
|
||||||
|
cd soju
|
||||||
test -z $(gofmt -l .)
|
test -z $(gofmt -l .)
|
||||||
|
Loading…
Reference in New Issue
Block a user