forked from fhirbase/fhirbase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
32 lines (26 loc) · 1.1 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
language: go
go:
- 1.12.x
cache:
directories:
- .gopath
sudo: required
services:
- docker
env:
- "PATH=/home/travis/gopath/bin:$PATH"
script:
- docker run -d --rm -p "36363:5432" -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres
-e POSTGRES_DB=fhirbase postgres:10.4
- bash -c 'while ! nc -z localhost 36363 ; do sleep 1 ; done'
- PGUSER=postgres PGPASSWORD=postgres PGDATABASE=fhirbase PGPORT=36363 make test
- "[ ! -z \"$TRAVIS_TAG\" ] && git describe --tags > .version || echo 'non-tag build'"
- GOOS=linux GOARCH=amd64 BINSUFFIX=-linux-amd64 make
- GOOS=linux GOARCH=386 BINSUFFIX=-linux-386 make
- GOOS=windows GOARCH=amd64 BINSUFFIX=-windows-amd64.exe make
- GOOS=windows GOARCH=386 BINSUFFIX=-windows-386.exe make
- GOOS=darwin GOARCH=amd64 BINSUFFIX=-darwin-amd64 make
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- "[ ! -z \"$TRAVIS_TAG\" ] && make docker || echo 'non-tag build'"
before_install:
- curl -L https://github.com/tcnksm/ghr/releases/download/v0.12.0/ghr_v0.12.0_linux_amd64.tar.gz --output ghr.tar.gz && tar zxvf ghr.tar.gz