forked from kubernetes-sigs/kubebuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (45 loc) · 1.64 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
language: go
cache:
directories:
- $HOME/.cache/go-build
- $GOPATH/pkg/mod
os:
- linux
- osx
go:
- 1.13.x
git:
depth: 3
go_import_path: sigs.k8s.io/kubebuilder
services: docker
script: ./test.sh
jobs:
include:
- stage: linting
before_script: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0
script: make lint
after_success: echo "Linting check succeeded"
after_failure: echo "Linting check failed. Run make lint to check it locally"
- stage: testdata
# Check if the the testdata is updated according to the current changes
# To update the testdata use the Makefile target `make generate`
script: make check-testdata
after_success: echo "Generate check succeeded."
after_failure: echo "Generate check failed. Run make test-gen to check it locally and use make generate to fix it"
- stage: coverage
# The following module is used to integrate the project with coveralls.io. It allow us to easily sent the data.
# More info: https://github.com/mattn/goveralls
before_script: go get github.com/mattn/[email protected]
script:
- make test-coverage
- $GOPATH/bin/goveralls -service=travis-ci -coverprofile=coverage-all.out -repotoken=$COVERALLS_TOKEN
after_success: echo "Coverage check succeeded. See in goveralls if the % of code covered with tests decreased."
after_failure: echo "Coverage step failed. Run make test-coverage to check it locally"
stages:
- linting
- testdata
- test
- coverage
# TBD. Suppressing for now.
notifications:
email: false