generated from OtusGolang/home_work
/
.travis.yml
71 lines (58 loc) · 1.55 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
language: go
go:
- "1.14"
os:
- linux
git:
depth: 1
quiet: true
submodules: false
notifications:
email: false
env:
global:
- GO111MODULE=on
- GOPROXY=https://proxy.golang.org
- BRANCH="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}"
before_install:
- echo "current branch is ${BRANCH}"
- if [ "${BRANCH}" == "master" ]; then travis_terminate 0; fi
- ls ${BRANCH} && cd ${BRANCH}
stages:
- name: Tests
jobs:
include:
- stage: "Tests"
name: "go get"
install: echo "skip"
script: go get "github.com/${TRAVIS_REPO_SLUG}/${BRANCH}"
- stage: "Tests"
name: "Linters"
install: go install github.com/golangci/golangci-lint/cmd/golangci-lint
script: golangci-lint run .
if: env(BRANCH) != hw12_13_14_15_calendar
- stage: "Tests"
name: "Unit tests"
install: go mod download
script: go test -v -count=1 -race -gcflags=-l -timeout=30s .
if: env(BRANCH) != hw12_13_14_15_calendar
- stage: "Tests"
name: "Optimization tests"
install: go mod download
script: go test -v -count=1 -timeout=30s -tags bench .
if: env(BRANCH) = hw10_program_optimization
- stage: "Tests"
name: "Bash tests"
install: echo "skip"
script: ./test.sh
if: env(BRANCH) IN (hw07_file_copying, \
hw08_envdir_tool, \
hw11_telnet_client)
- stage: "Tests"
name: "Makefile"
install: go mod download
script:
- make lint
- make test
- make build
if: env(BRANCH) = hw12_13_14_15_calendar