Skip to content

Commit

Permalink
edit: travis add docker tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksherron committed May 31, 2020
1 parent da002e7 commit 8105e9e
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
language: go
go:
- "1.13.x"
- "1.14.x"

services:
- postgresql
- docker

env:
- GO111MODULE=on

install: true
before_install:
- docker build -t nicksherron/bashhub-server .
- docker run -d -p 8080:8080 nicksherron/bashhub-server && curl localhost:8080/ping


jobs:
include:
- stage: build docker image
script: docker build -t bashhub-server .
- stage: run server
script: docker run --rm -d bashhub-server
- stage: ping docker server
script: curl http://localhost:8080/ping
- stage: test
script: go test ./... && go test github.com/nicksherron/bashhub-server/internal -postgres-uri "postgres://postgres:@localhost:5432?sslmode=disable"
script: go test ./... && go test github.com/nicksherron/bashhub-server/internal -postgres-uri "postgres://postgres:@localhost:5432?sslmode=disable"

0 comments on commit 8105e9e

Please sign in to comment.