-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
56 lines (44 loc) · 1.56 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
sudo: required
go_import_path: github.com/ory/hydra
cache:
directories:
- ./vendor/
before_cache:
services:
- docker
env:
- DOCKER_BIND_LOCALHOST=true DATABASE_URL=memory
language: go
go:
- 1.9
before_install:
- sudo apt-get install curl
install:
- go get -u github.com/go-swagger/go-swagger/cmd/swagger github.com/bradfitz/goimports github.com/mattn/goveralls golang.org/x/tools/cmd/cover github.com/Masterminds/glide github.com/mitchellh/gox github.com/ory/go-acc
- git clone https://github.com/docker-library/official-images.git ~/official-images
- glide install
- go install github.com/ory/hydra
- glide update
- go install github.com/ory/hydra
script:
- ./scripts/test-format.sh
- go-acc -o coverage.txt $(glide novendor)
- go test -race -short $(glide novendor | grep -v cmd)
- docker build -t hydra-travis-ci -f Dockerfile-without-telemetry .
- docker run -d hydra-travis-ci
- DATABASE_URL=memory hydra host --dangerous-auto-logon --dangerous-force-http --disable-telemetry &
- while ! echo exit | nc localhost 4444; do sleep 1; done
- ./scripts/test-e2e.sh
- ./scripts/run-genswag.sh
after_success:
- |-
[ "${TRAVIS_TAG}" != "" ] && gox -ldflags "-X github.com/ory/hydra/cmd.Version=`git describe --tags` -X github.com/ory/hydra/cmd.BuildTime=`TZ=UTC date -u '+%Y-%m-%dT%H:%M:%SZ'` -X github.com/ory/hydra/cmd.GitHash=`git rev-parse HEAD`" -output "dist/{{.Dir}}-{{.OS}}-{{.Arch}}"
deploy:
provider: releases
file_glob: true
api_key: "$GITHUB_TOKEN"
file: "dist/*"
skip_cleanup: true
on:
tags: true
go: 1.9