forked from gomods/athens
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (46 loc) · 1.17 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
services:
- docker
language: go
install: false
go:
- "1.11.x"
env:
global:
- PATH=${PATH}:./bin
- GO_ENV=test
- ATHENS_MONGO_STORAGE_URL=mongodb://127.0.0.1:27017
- ATHENS_MINIO_ENDPOINT=127.0.0.1:9001
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=minio123
- CODE_COV=1
- ATHENS_DIR=${GOPATH}/src/github.com/gomods/athens
- REGISTRY=gomods/
- GORELEASER_ON=1
- GO111MODULE=on
before_script:
- mkdir -p $ATHENS_DIR && rsync -azr . $ATHENS_DIR && cd $ATHENS_DIR
- make setup-dev-env
script:
- make verify test-unit test-e2e docker
after_success:
- if [ "${CODE_COV}" == "1" ]; then
curl -s https://codecov.io/bash -o codecov && bash codecov -X fix;
else
echo codecov not enabled;
fi
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
deploy:
- provider: script
script: make docker-push
on:
repo: gomods/athens
all_branches: true
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash
on:
repo: gomods/athens
tags: true
condition: $GORELEASER_ON = 1
condition: $GO111MODULE = on