Enable dependencies caching

This commit is contained in:
ErickSkrauch 2020-04-06 19:37:05 +03:00
parent 270e93d39e
commit d526b74d07
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E

View File

@ -5,25 +5,29 @@ go:
- "1.14" - "1.14"
stages: stages:
- test - Tests
- name: deploy - name: Deploy
if: env(TRAVIS_PULL_REQUEST) IS false AND (branch = master OR tag IS present) if: env(TRAVIS_PULL_REQUEST) IS false AND (branch = master OR tag IS present)
install: install:
- go get -u github.com/golang/dep/cmd/dep - go get -u github.com/golang/dep/cmd/dep
- dep ensure - dep ensure
cache:
directories:
- $GOPATH/pkg/dep
jobs: jobs:
include: include:
# Test stage # Tests stage
- name: Unit tests - name: Unit tests
stage: test stage: Tests
script: script:
- go test -v -race -coverprofile=coverage.txt -covermode=atomic ./... - go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- bash <(curl -s https://codecov.io/bash) - bash <(curl -s https://codecov.io/bash)
- name: FOSSA - name: FOSSA
stage: test stage: Tests
before_script: before_script:
- curl https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash - curl https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash
script: script:
@ -34,7 +38,7 @@ jobs:
# Deploy stage # Deploy stage
- name: Docker image - name: Docker image
stage: deploy stage: Deploy
services: services:
- docker - docker
script: script: