travis performance improvement (#13304)
Three optimizations: - move example testing logic into a bash script to save travis specific commands; - use kubernetes release package (about 20MB) instead of git repo (about 800 MB at the moment); - detect whether a PR contains changes to examples and skip examples testing if not. Closes: #13140
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
f61ed1d130
commit
89b2eb7f64
+5
-14
@@ -1,3 +1,6 @@
|
||||
env:
|
||||
global:
|
||||
- KUBE_VERSION: 1.13
|
||||
language: go
|
||||
go:
|
||||
- 1.11.5
|
||||
@@ -8,22 +11,10 @@ jobs:
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache/go-build
|
||||
# Don't want default ./... here:
|
||||
install:
|
||||
- export PATH=$GOPATH/bin:$PATH
|
||||
- mkdir -p $HOME/gopath/src/k8s.io
|
||||
- mv $TRAVIS_BUILD_DIR $HOME/gopath/src/k8s.io/website && cd $HOME/gopath/src/k8s.io/website
|
||||
|
||||
# Make sure we are testing against the correct branch
|
||||
- pushd $GOPATH/src/k8s.io && git clone https://github.com/kubernetes/kubernetes && popd
|
||||
- pushd $GOPATH/src/k8s.io/kubernetes && git checkout release-1.13 && make generated_files && popd
|
||||
- cp -L -R $GOPATH/src/k8s.io/kubernetes/vendor/ $GOPATH/src/
|
||||
- rm -r $GOPATH/src/k8s.io/kubernetes/vendor/
|
||||
|
||||
# Fetch additional dependencies to run the tests in examples/examples_test.go
|
||||
- go get -t -v k8s.io/website/content/en/examples
|
||||
- bash scripts/test_examples.sh install
|
||||
script:
|
||||
- go test -v k8s.io/website/content/en/examples
|
||||
- bash scripts/test_examples.sh run
|
||||
- name: "Hugo build"
|
||||
install:
|
||||
- make travis-hugo-build
|
||||
|
||||
Reference in New Issue
Block a user