forked from gomods/athens
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
55 lines (50 loc) · 1.51 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
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
- wget "https://dl.minio.io/server/minio/release/linux-amd64/minio"
# moving from the default port 9000 so it doesn't conflich with other services (i.e. vscode extensions server)
# we also need to change it in travis because the tests are using the config.dev.toml where port 9001 is used
- chmod +x minio && nohup ./minio server --address ":9001" . &
script:
- make verify test-unit test-e2e
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