diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..881a14b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: go +go: + - 1.14.2 + +services: + - docker + +jobs: + include: + - stage: "Tests and Linting" + name: "Linting" + script: go vet ./... + name: "Unit Tests" + script: go test -v ./... + - stage: "Build and Push Image" + name: "Build docker image" + script: docker build -t jaskaransarkaria/timer-server:"${TRAVIS_TAG}" . + +stages: + - Tests and Linting + - name: "Build and Push Image" + if: tag IS present diff --git a/travis.yml b/travis.yml deleted file mode 100644 index fa65f44..0000000 --- a/travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: go -go: - - 1.14.2 -# env: -# - "PATH=/home/travis/gopath/bin:$PATH" - -before_script: - - go vet ./... -