This repository has been archived by the owner on May 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
86 lines (80 loc) · 2.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
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
services:
- docker
after_success:
- bash <(curl -s https://codecov.io/bash) -F $TEST
matrix:
include:
# Check if compiled code is up to date
- name: "Codegen Check"
language: go
go:
- "1.12"
install:
- bash .scripts/install-protoc.sh
- bash .scripts/protoc-gen-go.sh
- go get -u github.com/maxbrunsfeld/counterfeiter
- go get -u github.com/vburenin/ifacemaker
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- dep ensure -v
script:
# generate code and exit with status 1 if diff is detected
- make gen
- git --no-pager diff protobuf
- git --no-pager diff core/database
- git diff-index --relative=protobuf --quiet HEAD --
- git diff-index --relative=core/database --quiet HEAD --
after_success: skip
# Go components
- name: "Core and Gateway Tests"
language: go
go:
- "1.12"
env:
- TEST="golang"
install:
- go get -u golang.org/x/lint/golint
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- dep ensure -v
before_script:
- go vet ./...
- go build ./...
# don't use development dynamodb setup, due to file permission issues
- docker run -d -p 8000:8000 amazon/dynamodb-local
- go test -run xxxx ./...
script:
- diff -u <(echo -n) <(gofmt -d -s `find . -type f -name '*.go' -not -path "./vendor/*"`)
- diff -u <(echo -n) <(golint `go list ./... | grep -v /vendor/`)
- go test -race -timeout 5m -coverprofile=coverage.txt ./...
# Frontend
- name: "Frontend Tests"
language: node_js
node_js:
- "10.15"
env:
# CI=false is temporary to prevent console prints failing builds
- TEST="frontend" CI=false
before_install: cd frontend
install:
- npm install
before_script:
- npm run lint
- npm run sass-lint
script:
- npm run build
- npm test -- --coverage
# Client
- name: "Client Tests"
language: node_js
node_js:
- "10.15"
env:
- TEST="client"
before_install: cd client
install:
- npm install
before_script:
- npm run lint
script:
- npm test
notifications:
email: false