forked from philippgille/gokv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
56 lines (45 loc) · 1.37 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
# Sudo is required for running Docker
sudo: required
services:
# Docker is required for running some services that aren't provided by Travis CI, e.g. Consul
- docker
- redis-server
- mongodb
- memcached
- mysql
git:
depth: 1
language: go
go:
- "1.12"
- "1.13"
env:
# For encrypted environment variables, use:
# travis encrypt 'PASSWORD="SECRET"' -r philippgille/gokv
global:
- GO111MODULE=on
# "DynamoDB local" accepts any credentials
- AWS_ACCESS_KEY_ID=user
- AWS_SECRET_ACCESS_KEY=secret
before_install:
- go version
- go env
# Overwrite the `install` phase because the default one runs `travis_install_go_dependencies`,
# which leads to errors in case some subdirectories are Go modules and others are regular Go packages
install:
- echo "Skipping default install phase"
# Don't start Docker containers all at once. The Travis CI VM doesn't have enough memory for that.
# TODO: Implement a proper wait (e.g. with container health check) instead of sleeping for 10s
script:
# Build
- build/build.sh
# Linter
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.15.0
- golangci-lint run
# Test
- build/test.sh
after_success:
# Combine coverage reports
- build/combine-coverage.sh
# Upload coverage data to codecov.io
- bash <(curl -s https://codecov.io/bash)