From 63400cb180276ccf7135d2892030d5f83f6bf2fe Mon Sep 17 00:00:00 2001 From: Meng Laijun Date: Sat, 17 Nov 2018 19:21:21 +0800 Subject: [PATCH] Add e2e_test for travis ci --- .travis.yml | 103 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 39 deletions(-) diff --git a/.travis.yml b/.travis.yml index f03265f07..58fd190a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,44 +1,69 @@ language: go - branches: only: - - master - - develop - - /^sprint.*$/ - + - master + - develop + - "/^sprint.*$/" matrix: include: - - os: osx - osx_image: xcode10 - go: "1.11" - before_install: - - brew install rocksdb - - brew install git-lfs - - git lfs install - - brew tap alecthomas/homebrew-tap - - brew install gometalinter - before_script: - - git lfs pull - script: - - make build - - make lint - - make test - after_success: - - bash <(curl -s https://codecov.io/bash) - - - os: linux - dist: trusty - go: "1.11" - services: - - docker - before_install: - - docker pull iostio/iost-dev:1.0.0 - - git lfs install - before_script: - - git lfs pull - script: - - docker run -it --rm -v $(pwd):/gopath/src/github.com/iost-official/go-iost iostio/iost-dev:1.0.0 make build - - docker run -it --rm -v $(pwd):/gopath/src/github.com/iost-official/go-iost iostio/iost-dev:1.0.0 make lint - - docker run -it --rm -v $(pwd):/gopath/src/github.com/iost-official/go-iost iostio/iost-dev:1.0.0 make test - after_success: - - bash <(curl -s https://codecov.io/bash) + - os: osx + osx_image: xcode10 + go: "1.11" + env: JOB=osx_test + before_install: + - brew install rocksdb + - brew install git-lfs + - git lfs install + - brew tap alecthomas/homebrew-tap + - brew install gometalinter + before_script: + - git lfs pull + script: + - make build + - make lint + - make test + after_success: + - bash <(curl -s https://codecov.io/bash) + - os: linux + dist: trusty + go: "1.11" + env: JOB=linux_test + services: + - docker + before_install: + - docker pull iostio/iost-dev:1.0.0 + - git lfs install + before_script: + - git lfs pull + script: + - docker run -it --rm -v $(pwd):/gopath/src/github.com/iost-official/go-iost iostio/iost-dev:1.0.0 make build + - docker run -it --rm -v $(pwd):/gopath/src/github.com/iost-official/go-iost iostio/iost-dev:1.0.0 make lint + - docker run -it --rm -v $(pwd):/gopath/src/github.com/iost-official/go-iost iostio/iost-dev:1.0.0 make test + after_success: + - bash <(curl -s https://codecov.io/bash) + - os: linux + dist: trusty + go: "1.11" + env: JOB=e2e_test + services: + - docker + before_install: + - docker pull iostio/iost-dev:1.0.0 + - git lfs install + - pyenv global 3.6 && pip install awscli + - go get -u -v github.com/kubernetes-sigs/aws-iam-authenticator/cmd/aws-iam-authenticator + - sudo apt-get update && sudo apt-get install -y apt-transport-https + - curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - + - echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list + - sudo apt-get update && sudo apt-get install -y kubectl + before_script: + - git lfs pull + script: + - pyenv global 3.6 + - echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin + - aws eks update-kubeconfig --region us-west-2 --name devnet + - make image + - make push + - kubectl get node + allow_failures: + - env: JOB=e2e_test