forked from TheThingsNetwork/lorawan-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
52 lines (52 loc) · 1.71 KB
/
.travis.yml
File metadata and controls
52 lines (52 loc) · 1.71 KB
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
language: go
go:
- "1.11.x"
conditions: v1
if: type = pull_request OR branch =~ master$
env:
global:
- YARN_CACHE_FOLDER=$HOME/.cache/yarn
matrix:
include:
- env: RUNTYPE=js
- env: RUNTYPE=go.lint
- env: RUNTYPE=go.test.amd64
- if: type = pull_request
env: RUNTYPE=go.test.386
- if: type = pull_request OR branch =~ master$
env: RUNTYPE=build-all
go_import_path: go.thethings.network/lorawan-stack
sudo: required
services:
- docker
cache:
directories:
- $HOME/.cache/go-build
- $HOME/.cache/yarn
- $GOPATH/pkg/mod
before_install:
- |
if [[ $RUNTYPE == go.test.amd64 || $RUNTYPE == go.test.386 ]]
then
sudo rm /usr/local/bin/docker-compose
curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
fi
- if [[ ! -z "$encrypted_fc3d5d829302_key" ]]; then openssl aes-256-cbc -K $encrypted_fc3d5d829302_key -iv $encrypted_fc3d5d829302_iv -in pkg/blob/testdata/gcloud.json.enc -out pkg/blob/testdata/gcloud.json -d; fi
install: true
script:
- if [[ $TRAVIS_EVENT_TYPE = pull_request ]]; then make ci.$RUNTYPE.full; else make ci.$RUNTYPE.simple; fi
after_success:
- if [[ $RUNTYPE == go.test.amd64 && ! -z "$COVERALLS_TOKEN" ]]; then make go.coveralls; fi
- |
if [[ $RUNTYPE == build-all && ! -z "$DOCKER_IMAGE" && ! -z "$DOCKER_USERNAME" && ! -z "$DOCKER_PASSWORD" ]]
then
make dev-deps deps docker
if [[ $TRAVIS_EVENT_TYPE == "push" && "$TRAVIS_BRANCH" =~ master$ ]]
then
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
docker tag "$DOCKER_IMAGE" "$DOCKER_IMAGE:latest"
docker push "$DOCKER_IMAGE:latest"
fi
fi