Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
110 lines (100 sloc) 5.19 KB
language: go
go:
- "1.13"
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:
- $GOPATH/pkg
- images
- daemon/web/node_modules
jobs:
include:
############################
# Set up cache #
############################
- stage: precache and test build
script: true
install:
- go mod download # cache dependencies
- make daemon TAG=test # cache daemon image
- make web-deps # cache node_modules
############################
# Linters #
############################
- stage: lint
install: go get -u golang.org/x/lint/golint
script: make lint
############################
# Tests and Linting #
############################
- &test
stage: tests and static analysis
name: "Core Tests"
install:
- bash test/docker_deps.sh
script:
- docker run --name testcontainer -d nginx
- go test -race -tags no_bootstrap -coverprofile=coverage.txt ./...
after_success:
- bash <(curl -s https://codecov.io/bash)
# Make sure bootstrap works on various other VPS platforms
- &bootstraptest
<<: *test
name: "Bootstrap Test (debian:9.3)"
install: make testenv VPS_OS=debian VPS_VERSION=9.3 SSH_PORT=69
script:
- make testdaemon-scp
- go test ./... -v -run 'TestBootstrap_Integration' -coverprofile=coverage.txt -ldflags "-X github.com/ubclaunchpad/inertia/cmd.Version=test"
after_success:
- bash <(curl -s https://codecov.io/bash)
- <<: *bootstraptest
name: "Bootstrap Test (centos:7)"
install: make testenv VPS_OS=centos VPS_VERSION=7 SSH_PORT=69
- <<: *bootstraptest
name: "Bootstrap Test (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
- <<: *bootstraptest
name: "Bootstrap Test (ubuntu:16.04)"
install: make testenv VPS_OS=ubuntu VPS_VERSION=16.04 SSH_PORT=69
- <<: *bootstraptest
name: "Bootstrap Test (ubuntu:18.04)"
install: make testenv VPS_OS=ubuntu VPS_VERSION=18.04 SSH_PORT=69
############################
# 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 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*
on:
repo: ubclaunchpad/inertia
branch: master
tags: true
notifications:
email: false
You can’t perform that action at this time.