Skip to content

Commit 8105e9e

Browse files
committed
edit: travis add docker tests
1 parent da002e7 commit 8105e9e

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

.travis.yml

+6-13
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
language: go
22
go:
3-
- "1.13.x"
3+
- "1.14.x"
44

55
services:
66
- postgresql
7+
- docker
78

89
env:
910
- GO111MODULE=on
1011

11-
install: true
12+
before_install:
13+
- docker build -t nicksherron/bashhub-server .
14+
- docker run -d -p 8080:8080 nicksherron/bashhub-server && curl localhost:8080/ping
1215

13-
14-
jobs:
15-
include:
16-
- stage: build docker image
17-
script: docker build -t bashhub-server .
18-
- stage: run server
19-
script: docker run --rm -d bashhub-server
20-
- stage: ping docker server
21-
script: curl http://localhost:8080/ping
22-
- stage: test
23-
script: go test ./... && go test github.com/nicksherron/bashhub-server/internal -postgres-uri "postgres://postgres:@localhost:5432?sslmode=disable"
16+
script: go test ./... && go test github.com/nicksherron/bashhub-server/internal -postgres-uri "postgres://postgres:@localhost:5432?sslmode=disable"

0 commit comments

Comments
 (0)