forked from ubclaunchpad/inertia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
102 lines (93 loc) · 4.91 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
language: go
go:
- "1.10"
services:
- docker
env:
global: # DOCKER_USER, DOCKER_KEY
- secure: "Wmv2HWUKWM0S5Kh1IgX/VKhQ21Oi85LZgHZVYXqGppa3wHO5hKYOSoWnBBR3uNgHsYPi3RL7kRNDDuKWyDAWU+2hV2xjXfqfSwsH9Sj8pFn/60KcIoMJU8EkxydJks6+H4sf04Fei1zSXc2ySTIsvCUSUKDOi8ZJCqkDxV0hIK0TmXn7isDcRWnHTvpNqLarQ4LyN9Qi8qU/NR28cNHIdkZaWxT0gciNwT9ep/vrG32aaIsNB/Ikn43A38mx5B9iSmG7YtZzDYldMEyOhCDqZIxwOjA1J1nHYqeYq/RrF6JJYpprBfEjEDa73cUBy8JVZqb3ur5uL0FeBFfToNBdK/Qbj93pkOS8pQSgyxCCpACJBeSrzuolVKLxMLbfc6YoFXaEeu7oCE5T3P4hws6yP2MD1opAMnTCLUyWRWecH6PwVwgrlur6EvrEpimGOWk4TmmomvQMRVbDF1JYuY+4QD2M2tTkmts+pwpvEkBF+aOatSE1xUWYAtwsjnAjBSL7mhWSUeBT6MlTeaO1UqNb5qW2Fbz5KSYDh71T3DslWiCxad6x48/eXBAtApQ1mHbHtCrAALHz3h1Ioe7GA/7CWigakPayfMOYuavPDE7Ghrt8m9RlvTVoV5HgWHM9Ophrv+OnAb0RYDpPKU8+ejgqqI+kV9dy10SK6LAnXoM+kd0="
- secure: "jloKHZ9QfPnER+X34GnQQ+GIf5d+ZHiC8Nu4mNVR0QiqK4EH2BnJExOpSUtkDCLZqPdzIAD3efTs/vgm0Od+GKbOGW/s83oy605OR13Bop6fDNoMWTf6fBlZ4JxfVmJSVbv6jKhx627HTC4U1aFDxRfgmN+113YLYCodQlB3F98m5ldD1xA+uuOeLp1FXCS9p9L+1/GWninyYEjrDVZz37c6kYsQJPhPvWAr3VcnnEE0vX0RmyKIOgM3/7gYf57HMlUo6Ri0cF4+WDUV+6R8RGbInZPErTSGR3qwyGwq1RbHkqFYCU4gVSEih2uo4pflKqoiXsDkrKg5FKxE3X0YG/rKnlZ3ElX4VYg3Pn4sGvXp45QW6tb4syVGXNgmIhtmYHoTvh48DDtvsbpVc7VwLv6E/dI53BvIv5/AKGDNWafsBRo0OZfr5V/XH6JLr2eWO+PXBiqhvUsP+r29iKVywKL5hjEJ+sKkm1O0ZXJPhGJNgajG5UHr1N+s61QmZGMKas2hO0p2ZjGxje/Fmdt+DiJ6UsPhEk5uLYWjcGFnbKYZlo2WUzO6bo1P5VQDXlr6mGRwIwOf8j/QidT+pz4cYdX63BMJw40OfKB87UcegZsncJpLK7hzJpcxZ//WCqmU/EPNfeIB4JRFlzRCxzMwKe7HOTmKwz2+tbO1GyWDuw8="
cache:
directories:
- vendor
- images
- daemon/web/node_modules
jobs:
include:
############################
# Set up cache #
############################
- stage: precache and test build
script: true
install:
- go get github.com/golang/dep/cmd/dep
- dep ensure -v # cache vendor
- make testdaemon-image # cache images
- make web-deps # cache node_modules
############################
# Tests and Linting #
############################
- &test
stage: tests and static analysis
name: "Unit + Integration Tests (ubuntu:16.04)"
install:
- make testenv VPS_OS=ubuntu VPS_VERSION=16.04 SSH_PORT=69
- bash test/docker_deps.sh
before_script:
- make testdaemon-scp SSH_PORT=69
script:
- go test -race -coverprofile=coverage.txt ./...
after_success:
- bash <(curl -s https://codecov.io/bash)
# Make sure bootstrap works on various other VPS platforms
- &bootstraptest
<<: *test
name: "Integration Tests (debian:9.3)"
install: make testenv VPS_OS=debian VPS_VERSION=9.3 SSH_PORT=69
script: go test ./... -v -run 'TestBootstrapIntegration' -ldflags "-X github.com/ubclaunchpad/inertia/cmd.Version=test"
after_success: true
- <<: *bootstraptest
name: "Integration Tests (centos:7)"
install: make testenv VPS_OS=centos VPS_VERSION=7 SSH_PORT=69
- <<: *bootstraptest
name: "Integration Tests (amazonos:1)"
install: make testenv VPS_OS=amazon VPS_VERSION=1 SSH_PORT=69
# - <<: *bootstraptest
# install: make testenv VPS_OS=amazon VPS_VERSION=2 SSH_PORT=69
# Run linter and static analysis
- name: "Linters and static analysis"
install: go get -u golang.org/x/lint/golint
script: make lint
############################
# Build tag "latest" #
############################
- stage: build "latest"
if: (branch = master) AND (type = push) AND (type != pull_request)
install: true
script:
- docker login -u $DOCKER_USER -p $DOCKER_KEY
- make daemon RELEASE=latest
############################
# Build git tag (stable) #
############################
- stage: build release
if: (tag IS present) AND (type != pull_request)
install: true
script: true
before_deploy:
- docker login -u $DOCKER_USER -p $DOCKER_KEY
- bash .scripts/release.sh
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: eHe5lL6mVp6XQM5sdUQHWcugROAjZC5Gf81flIjM/4K1ceUQfblIQ3/suXOHBXl+jGro0DTlI/a8S9zKb3NDdlTiXjABQD8KkWNMfEqajUInRwSFE7vSvydzJDuwO00KZOuFKdp2hZwpO2jbODZvHEnYONTClle5pV6bzhp4JaY1P0CjAl6/E67WVjpNQmHNIlzcZ7PRLe7KcjEl5N7DIg/B4R19EiBTjaPsCh8xP/T68cqVVa+4cwUAxN6Xd0ca81T9dkhppRL9tiJRn6iP/x64paIeWV0pF80V2PKTwbI9Ox0mcd7TWkHFD4taV+UwQUeOeN3OR7NHfzyPtWUcCVOp3wxFKvWySPYNeh8x8OrFh7HzIMl+20SQ/rdEsJJ6cfMx+qp+RBJmSj+Btm/ZxfEZgjRTg2jiCeUNnNpBL+46U49TVPTuw7+K97x/cGRF9k0JAfkq75tQTPCoQwmkCqTeJ6KGwFwlDx5+OUCJz3WS0XfQ6k88eYQygmBBdWqoHXUS75vOa96GVN1JSp8tBpSp0lUp+U2QQJkIy9VN9NpMlsbn3r5Ssk/AtEhal1fpT5tncPvzphwSKDH3WtCJ+FJjMajBIlZA2yop1VdsVJzKFBo2DH+yn8qd1tIsp5C+HDPvulCYMFCg7zJk0ksXZVERTGnrnRBSENW+Ut1avJ0=
file_glob: true
file: inertia.v*
go: "1.10"
on:
repo: ubclaunchpad/inertia
branch: master
tags: true
notifications:
email: false