|
5 | 5 | - $HOME/.cache/go-build
|
6 | 6 | - $GOPATH/pkg/mod
|
7 | 7 |
|
8 |
| -os: |
9 |
| - - linux |
10 |
| - - osx |
| 8 | +os: linux |
11 | 9 |
|
12 | 10 | go:
|
13 |
| -- "1.13" |
| 11 | + - "1.13" |
14 | 12 |
|
15 |
| -# A build matix defines the K8s versions to use for e2e tests. Travis runs these in parrellel |
| 13 | +# A build matrix defines the K8s versions to use for e2e tests. Travis runs these in parallel |
16 | 14 | env:
|
17 | 15 | - KIND_K8S_VERSION="v1.16.2"
|
18 | 16 | - KIND_K8S_VERSION="v1.15.3"
|
19 | 17 | - KIND_K8S_VERSION="v1.14.1"
|
20 |
| - - GOPROXY=https://proxy.golang.org/ |
21 |
| -# As OSX isn't running KIND e2e tests exlude it from the matrix |
22 |
| -matrix: |
23 |
| - exclude: |
24 |
| - - os: osx |
25 |
| - env: KIND_K8S_VERSION="v1.16.2" |
26 |
| - - os: osx |
27 |
| - env: KIND_K8S_VERSION="v1.15.3" |
28 |
| - - os: osx |
29 |
| - env: KIND_K8S_VERSION="v1.14.1" |
30 |
| - - os: linux |
31 |
| - env: GOPROXY=https://proxy.golang.org/ |
32 | 18 |
|
33 | 19 | git:
|
34 | 20 | depth: 3
|
35 | 21 |
|
36 | 22 | go_import_path: sigs.k8s.io/kubebuilder
|
37 | 23 |
|
38 |
| -services: |
39 |
| -- docker |
40 |
| - |
41 |
| -before_install: |
42 |
| -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p /Users/travis/gopath/bin; fi |
43 |
| - |
44 |
| -before_script: |
| 24 | +services: docker |
45 | 25 |
|
46 | 26 | # Install must be set to prevent default `go get` to run.
|
47 | 27 | # The dependencies have already been vendored by `dep` so
|
48 | 28 | # we don't need to fetch them.
|
49 |
| -install: |
50 |
| - - |
| 29 | +install: skip |
51 | 30 |
|
52 |
| -script: |
53 |
| -- ./test.sh |
54 |
| -- if [ "$TRAVIS_OS_NAME" = "linux" ]; then PATH=$PATH:$(pwd) ./test_e2e.sh; fi |
| 31 | +before_script: PATH=$PATH:$(pwd) |
| 32 | + |
| 33 | +script: ./test_e2e.sh |
55 | 34 |
|
56 | 35 | jobs:
|
57 | 36 | include:
|
58 |
| - - stage: Validations |
59 |
| - before_script: |
60 |
| - - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0 |
61 |
| - script: |
62 |
| - - ./scripts/verify.sh |
63 |
| - # The golden_test.sh check if the the testdata is updated according to the current changes |
64 |
| - # To update the testdata use the Makefile targets `make generate-setup` then `make generate-testdata` |
65 |
| - - ./golden_test.sh |
66 |
| - - stage: Go Coverage |
67 |
| - before_script: |
68 |
| - # The following module is used to integrate the projct with coveralls.io. It allow us to easily sent the data. |
69 |
| - # More info: https://github.com/mattn/goveralls |
70 |
| - - go get github.com/mattn/[email protected] |
| 37 | + - stage: linting |
| 38 | + env: |
| 39 | + before_script: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0 |
| 40 | + script: ./scripts/verify.sh |
| 41 | + |
| 42 | + - stage: golden |
| 43 | + # The golden_test.sh check if the the testdata is updated according to the current changes |
| 44 | + # To update the testdata use the Makefile targets `make generate-setup` then `make generate-testdata` |
| 45 | + env: |
| 46 | + before_script: skip |
| 47 | + script: ./golden_test.sh |
| 48 | + |
| 49 | + - stage: local |
| 50 | + env: |
| 51 | + before_script: skip |
| 52 | + script: ./test.sh |
| 53 | + - stage: local |
| 54 | + os: osx |
| 55 | + env: |
| 56 | + before_script: skip |
| 57 | + script: ./test.sh |
| 58 | + |
| 59 | + - stage: coverage |
| 60 | + # The following module is used to integrate the projct with goveralls.io. It allow us to easily sent the data. |
| 61 | + # More info: https://github.com/mattn/goveralls |
| 62 | + env: |
| 63 | + before_script: go get github.com/mattn/[email protected] |
71 | 64 | script:
|
72 | 65 | - make test-coverage
|
73 | 66 | - $GOPATH/bin/goveralls -service=travis-ci -coverprofile=coverage-all.out -repotoken=$COVERALLS_TOKEN
|
74 | 67 |
|
| 68 | +stages: |
| 69 | + - linting |
| 70 | + - golden |
| 71 | + - local |
| 72 | + - test |
| 73 | + - coverage |
| 74 | + |
75 | 75 | # TBD. Suppressing for now.
|
76 | 76 | notifications:
|
77 | 77 | email: false
|
|
0 commit comments