Travice chek
parent
d92f869a9a
commit
0ea47c3d6d
|
@ -0,0 +1,19 @@
|
||||||
|
run:
|
||||||
|
tests: false
|
||||||
|
|
||||||
|
linters:
|
||||||
|
disable-all: false
|
||||||
|
enable-all: true
|
||||||
|
disable:
|
||||||
|
- goerr113
|
||||||
|
- gochecknoglobals
|
||||||
|
- gochecknoinits
|
||||||
|
- godox
|
||||||
|
- gomnd
|
||||||
|
- lll
|
||||||
|
- nakedret
|
||||||
|
- wsl
|
||||||
|
- gofumpt
|
||||||
|
- gosec
|
||||||
|
- nlreturn
|
||||||
|
- gocritic
|
|
@ -0,0 +1,35 @@
|
||||||
|
language: go
|
||||||
|
|
||||||
|
go:
|
||||||
|
- "1.14"
|
||||||
|
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
|
||||||
|
git:
|
||||||
|
depth: 1
|
||||||
|
quiet: true
|
||||||
|
submodules: false
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- GO111MODULE=on
|
||||||
|
- GOPROXY=https://proxy.golang.org
|
||||||
|
- BRANCH="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}"
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- name: Tests
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
- stage: "Tests"
|
||||||
|
name: "Makefile"
|
||||||
|
install: go mod download
|
||||||
|
script:
|
||||||
|
- make lint
|
||||||
|
- make test
|
||||||
|
- make build
|
||||||
|
if: (type = push) OR (type = pull_request)
|
|
@ -0,0 +1,13 @@
|
||||||
|
build:
|
||||||
|
go build -o bin ./src/main.go
|
||||||
|
|
||||||
|
test:
|
||||||
|
go test -race ./src/...
|
||||||
|
|
||||||
|
lint: install-lint-deps
|
||||||
|
golangci-lint run ./src/...
|
||||||
|
|
||||||
|
install-lint-deps:
|
||||||
|
(which golangci-lint > /dev/null) || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.31.0
|
||||||
|
|
||||||
|
.PHONY: build test lint
|
|
@ -0,0 +1,7 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "log"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
log.Println("Начел кончел стоп медвед")
|
||||||
|
}
|
Loading…
Reference in New Issue