-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
49 lines (40 loc) · 1.3 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
40
41
42
43
44
45
46
47
48
49
language: go
sudo: false
dist: focal
branches:
only:
- master
- development
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
services:
- docker
go:
- 1.15.x
matrix:
fast_finish: true
before_install:
- sudo apt-get update
- docker pull minio/minio
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
- nvm install 12.18.3
install:
- sudo apt-get -y install youtube-dl ffmpeg
- npm install -g snyk
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.31.0
- if [[ "${GO111MODULE}" = "on" ]]; then go mod download; else go get -t -v ./...; fi
script:
- docker run -d -p 127.0.0.1:9000:9000 -e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" -e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" minio/minio server /data
- snyk test
- golangci-lint run
- go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
- curl -sfL https://git.io/goreleaser | sh -s -- check
after_success:
- bash <(curl -s https://codecov.io/bash)
- test -n "$TRAVIS_TAG" && docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
deploy:
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash
on:
tags: true
condition: $TRAVIS_OS_NAME = linux