From bd06d627906410e629d456ca4860439af25e8df5 Mon Sep 17 00:00:00 2001 From: Vaibhav Date: Tue, 25 Feb 2020 20:00:50 -0500 Subject: [PATCH] fix: revert to travis (#509) --- .circleci/config.yml | 23 +-------------------- .travis.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 22 deletions(-) create mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index f27041af37..542154718a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,20 +21,6 @@ jobs: key: go-dep-cache-{{ checksum "Gopkg.lock" }}-v4 paths: - ./vendor - # test runs the unit tests and stores test results in TEMP_RESULTS - test: - docker: - - image: golang:1.13.7 - working_directory: /go/src/github.com/argoproj/argo-events - steps: - - checkout - - restore_cache: - keys: - - go-dep-cache-{{ checksum "Gopkg.lock" }}-v4 - - go-dep-cache- - - run: - name: Run unit tests - command: make test # build runs the build of the linux artifacts and persists the packages to the circleci workspace build: docker: @@ -82,16 +68,9 @@ workflows: filters: tags: only: /.*/ - - test: - requires: - - install_dep - filters: - tags: - only: /.*/ - build: requires: - install_dep - - test filters: tags: only: /.*/ @@ -103,4 +82,4 @@ workflows: ignore: /.*/ tags: # only recognise tags with semantic versioning e.g. 0.1.0 - only: /^\d+\.\d+\.\d+.*$/ + only: /^\d+\.\d+\.\d+.*$/ \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..d870efb083 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,49 @@ +language: go +go: + - 1.x + +services: + - docker + +cache: + directories: + - $HOME/bin + - $HOME/docker + +env: + global: + - DOCKER_PUSH=false + - IMAGE_TAG=v0.12.2 + - PATH=$HOME/bin:$PATH + +before_install: + # Load cached docker images + - if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi + - go get github.com/mattn/goveralls + - if [ ! -d $HOME/bin/kubectl ]; then + mkdir -p $HOME/bin; + curl -o $HOME/bin/kubectl -L https://storage.googleapis.com/kubernetes-release/release/v1.13.4/bin/linux/amd64/kubectl; + chmod +x $HOME/bin/kubectl; + fi + +before_cache: + # Save tagged docker images + - > + mkdir -p $HOME/docker && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}' + | xargs -n 2 -t sh -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker/$1.tar.gz' +install: + - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + - dep version + - dep ensure -vendor-only + +script: + - make test + - make all + - make test coverage + +deploy: + provider: releases + api_key: $GITHUB_OAUTH_TOKEN + skip_cleanup: true + on: + tags: true