Skip to content

Commit

Permalink
fix: revert to travis (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
VaibhavPage authored Feb 26, 2020
1 parent c9fa553 commit bd06d62
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 22 deletions.
23 changes: 1 addition & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -82,16 +68,9 @@ workflows:
filters:
tags:
only: /.*/
- test:
requires:
- install_dep
filters:
tags:
only: /.*/
- build:
requires:
- install_dep
- test
filters:
tags:
only: /.*/
Expand All @@ -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+.*$/
49 changes: 49 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit bd06d62

Please sign in to comment.