-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
74 lines (62 loc) · 2.44 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
# Travis configuration for tcp-info fast sidestream tool.
dist: focal
language: go
go:
- 1.20
services:
- docker
###########################################################################
before_install:
# Coverage tools
- go install github.com/mattn/goveralls@latest
- echo Branch is ${TRAVIS_BRANCH} and Tag is $TRAVIS_TAG
install:
# Install dependencies
# This filters out all imports from the local project, and all "base" imports that don't contain slash.
- sudo apt-get update && sudo apt-get install -y zstd
- go get -v -t ./...
script:
# Vet the code, build the code, and run all the tests.
- go vet ./...
- go build ./...
- go test ./... -v -coverpkg=./... -coverprofile=_coverage.cov
# Build a Docker image to make sure that we can.
- docker build --build-arg COMMIT=$TRAVIS_BRANCH -t measurementlab/tcp-info .
# Coveralls
# Upload coverage information for unit tests.
- $HOME/gopath/bin/goveralls -coverprofile=_coverage.cov -service=travis-ci
#################################################################################
# Deployment Section
#
# Overview:
# 1. Test in sandbox during development
# 2. Deploy to staging on commit to integration
# 3. Deploy to prod when a branch is tagged with prod-* or xxx-prod-*
#
# We want to test individual components in sandbox, and avoid stepping on each
# other, so we do NOT automate deployment to sandbox. Each person should
# use a branch name to trigger the single deployment that they are working on.
#
# We want to soak all code in staging before deploying to prod. To avoid
# incompatible components, we deploy ALL elements to staging when we merge
# to integration branch.
#
# Deployments to prod are done by deliberately tagging a specific commit,
# typically in the integration branch, with a tag starting with prod-*.
# DO NOT just tag the latest version in integration, as someone may have
# pushed new code that hasn't had a chance to soak in staging.
#
#
# Deploy steps never trigger on a new Pull Request. Deploy steps will trigger
# on specific branch name patterns, after a merge to integration, or on
# an explicit tag that matches "on:" conditions.
#################################################################################
# uncomment this once we get a deployment. An empty deploy: makes the linter
# angry.
# deploy:
#########################################
## Sandbox
#########################################
## Staging
#########################################
## Production