-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
39 lines (37 loc) · 1.03 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# https://docs.travis-ci.com/user/languages/go/
sudo: false
language: go
go:
- 1.x
go_import_path: github.com/elonzh/colly-bolt-storage
cache:
directories:
- $GOPATH/github.com/elonzh/colly-bolt-storage/vendor
stages:
- lint
- test
- deploy
jobs:
include:
- stage: lint
script:
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.22.2
- golangci-lint run
- stage: test
script:
- go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
after_success:
- bash <(curl -s https://codecov.io/bash)
- stage: deploy
script: skip
deploy:
provider: script
skip_cleanup: true
script: curl -sL http://git.io/goreleaser | bash
on:
tags: true
branch: master
condition: $TRAVIS_OS_NAME = linux
notifications:
webhooks:
- https://oapi.dingtalk.com/robot/send?access_token=7d48ecc5d7d61de7165e655ab9f44dfb02fb6a35223f80beef151d6e082e4e1f