Travice chek

master
Andrey Ivanov 2020-10-07 09:43:33 +03:00 committed by Andrey Ivanov
parent d92f869a9a
commit 0ea47c3d6d
4 changed files with 74 additions and 0 deletions

19
.golangci.yml Normal file
View File

@ -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

35
.travis.yml Normal file
View File

@ -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)

13
Makefile Normal file
View File

@ -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

7
src/main.go Normal file
View File

@ -0,0 +1,7 @@
package main
import "log"
func main() {
log.Println("Начел кончел стоп медвед")
}