Skip to content

Commit 8b43c8f

Browse files
committed
update to golangci-lint 1.27
increase golangci lint timeout Travis testing (#85) * fix arch setup * use dpl v2
1 parent 8db4f04 commit 8b43c8f

File tree

6 files changed

+71
-32
lines changed

6 files changed

+71
-32
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
**/asset/templates.go
1717
/packages
1818
/main
19-
/bridgr
19+
/bridgr-*
2020
*.sha256
2121
code-quality-report.json
2222

.golangci.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,9 @@ linters:
1313
- gomnd
1414
run:
1515
tests: false
16+
timeout: 3m0s
17+
out-format: colored-line-number
18+
skip-dirs: /home/travis/gopath/pkg/mod
19+
modules-download-mode: readonly
1620
service:
17-
golangci-lint-version: 1.24.x
21+
golangci-lint-version: 1.27.x

.travis.yml

+53-22
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ language: go
22
dist: xenial
33
os:
44
- linux
5-
env:
6-
global:
7-
# Force-enable Go modules. This will be unnecessary when Go 1.13 lands.
8-
- GO111MODULE=on
9-
- GOARCH=amd64
105
stages:
116
- checks
127
- test
@@ -16,46 +11,82 @@ go:
1611
cache:
1712
directories: [$GOPATH/pkg/mod]
1813

19-
# Only clone the most recent commit.
14+
# clone the full repo
2015
git:
21-
depth: 1
16+
depth: false
2217

2318
install: true
2419

20+
notifications:
21+
email:
22+
on_success: change
23+
on_failure: always
24+
2525
# script always runs to completion (set +e). If we have linter issues AND a
2626
# failing test, we want to see both. Configure golangci-lint with a
2727
# .golangci.yml file at the top level of your repo.
2828
jobs:
2929
include:
3030
- stage: checks
3131
# script: golangci-lint run # run a bunch of code checkers/linters in parallel
32-
script:
33-
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0
32+
before_script:
33+
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0
34+
<<<<<<< HEAD
3435
- golangci-lint --version # test that we got it
36+
- pwd; ls -altr; ls -alR
37+
=======
38+
script:
39+
>>>>>>> de22ee4... Travis testing (#85)
3540
- make download
3641
- make lint
3742
- stage: test
3843
script:
39-
- make coverage && bash <(curl -s https://codecov.io/bash)
44+
- make coverage
45+
after_success:
46+
- bash <(curl -s https://codecov.io/bash)
4047
# trigger goreportcard scan
4148
- curl -s -d "repo=github.com/$TRAVIS_REPO_SLUG" https://goreportcard.com/checks
4249
- stage: build
43-
script: GOOS=linux make #need this here because gvm resets the GOOS var from the "env:" line
50+
script:
51+
- GOOS=linux make # gimmie and gvm don't pass through GOOS variables :(
52+
- ls -altr
53+
arch: amd64
4454
env: GOOS=linux
4555
- stage: build
46-
script: GOOS=windows make
56+
script:
57+
- GOOS=linux make
58+
- ls -altr
59+
arch: arm64
60+
env: GOOS=linux
61+
- stage: build
62+
script:
63+
- GOOS=windows make
64+
- ls -altr
65+
arch: amd64
4766
env: GOOS=windows
4867
- stage: build
49-
script: GOOS=darwin make
68+
script:
69+
- GOOS=darwin make
70+
- ls -altr
71+
arch: amd64
5072
env: GOOS=darwin
73+
# fails to build darwin/arm64 combo
74+
# - stage: build
75+
# script:
76+
# - GOOS=darwin make
77+
# - ls -altr
78+
# arch: arm64
79+
# env: GOOS=darwin
5180

5281
deploy:
53-
on:
54-
tags: true
55-
condition: $TRAVIS_BUILD_STAGE_NAME = Build
56-
provider: releases
57-
api_key:
58-
secure: BsjDpZkQEG+gH87ZZC4qWb4xRQhAO22Yg08H/2eZXVzO5eSuXDL96peCBy+3jozlJ5mMDbwXnnAs9EnWBWyIMeNkLev2MoKXm3xTVI6yNxc4pflBmBg4mu3YFQQmZTqtzFr3NBy5+tcL6h/3S0KEShOb9J7csUsimHzZfA19wbOZjdyqNXo9poDekeHnT++3k/NRDfjrsDTUgUUzBYs5yNh2vVKNjcgihiv61eHlbWjgwLjJYR08po+6PCJ6hLwg3/TXqe0r7PUeNJaTk2NdY69LPxXh3sRfbmXibA8a7IudI8uLfSOKrrw6+tWDUWMz4vHfb4ETZx71wwhcBgIs5NPQJw4vlknm89kv+7aJBwjVRI9zoz9tX/TGqXSVo7C1yM3Ic788na74L2m8U6rGYUeGEAai1wbYVUqRi9hpMAhWImtKqHDFYGYI/EYoE3Rco5bpM4xx1LT/tqdu44CpPNbkzWcJF+2yxroyY/ze/mL63YwJxOCtQwXSICkawbHtmS+m9EOGjskWQ0nKIb/mpFBEhIxYJl6wTUrYvzmK/nIvO9O27b+GGk6NgFXzkY+OKoMMIL721KkKMQTH2fDPh9/GB69NVkE2olbtqL0lfxEJQ5uzdQX1LsfjM/P2qRHdrGh9oQ2PYiRDoG04R9TC4rlLNlmNUb365A+5q62WH5A=
59-
file_glob: true
60-
file: bridgr-*
61-
skip_cleanup: true
82+
- provider: releases
83+
edge: true
84+
on:
85+
tags: true
86+
condition: $TRAVIS_BUILD_STAGE_NAME = build
87+
token:
88+
secure: BsjDpZkQEG+gH87ZZC4qWb4xRQhAO22Yg08H/2eZXVzO5eSuXDL96peCBy+3jozlJ5mMDbwXnnAs9EnWBWyIMeNkLev2MoKXm3xTVI6yNxc4pflBmBg4mu3YFQQmZTqtzFr3NBy5+tcL6h/3S0KEShOb9J7csUsimHzZfA19wbOZjdyqNXo9poDekeHnT++3k/NRDfjrsDTUgUUzBYs5yNh2vVKNjcgihiv61eHlbWjgwLjJYR08po+6PCJ6hLwg3/TXqe0r7PUeNJaTk2NdY69LPxXh3sRfbmXibA8a7IudI8uLfSOKrrw6+tWDUWMz4vHfb4ETZx71wwhcBgIs5NPQJw4vlknm89kv+7aJBwjVRI9zoz9tX/TGqXSVo7C1yM3Ic788na74L2m8U6rGYUeGEAai1wbYVUqRi9hpMAhWImtKqHDFYGYI/EYoE3Rco5bpM4xx1LT/tqdu44CpPNbkzWcJF+2yxroyY/ze/mL63YwJxOCtQwXSICkawbHtmS+m9EOGjskWQ0nKIb/mpFBEhIxYJl6wTUrYvzmK/nIvO9O27b+GGk6NgFXzkY+OKoMMIL721KkKMQTH2fDPh9/GB69NVkE2olbtqL0lfxEJQ5uzdQX1LsfjM/P2qRHdrGh9oQ2PYiRDoG04R9TC4rlLNlmNUb365A+5q62WH5A=
89+
file_glob: true
90+
file: bridgr-*
91+
cleanup: false
92+
overwrite: true

Makefile

+9-7
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ PKG := "$(PROJECT_NAME)"
33
CMD := cmd/bridgr/main.go
44
VERSION := $(shell git describe --always --dirty | sed 's/^v//')
55
GO_FILES := $(shell find . -name '*.go' | grep -v _test.go)
6+
OS := $(shell go env GOOS)
7+
ARCH := $(shell go env GOARCH)
68

79
.SUFFIXES:
810
.PHONY: all coverage lint test race x2unit xunit clean generate download locallint cilint
911

10-
ifeq ($(GOOS), linux)
11-
PROJECT_NAME := $(PROJECT_NAME)-Linux
12-
else ifeq ($(GOOS), windows)
13-
PROJECT_NAME := $(PROJECT_NAME)-Windows
14-
else ifeq ($(GOOS), darwin)
15-
PROJECT_NAME := $(PROJECT_NAME)-MacOS
12+
ifeq ($(OS), linux)
13+
PROJECT_NAME := $(PROJECT_NAME)-Linux-$(ARCH)
14+
else ifeq ($(OS), windows)
15+
PROJECT_NAME := $(PROJECT_NAME)-Windows-$(ARCH)
16+
else ifeq ($(OS), darwin)
17+
PROJECT_NAME := $(PROJECT_NAME)-MacOS-$(ARCH)
1618
endif
1719

1820
all: $(PROJECT_NAME) $(PROJECT_NAME).sha256
@@ -29,7 +31,7 @@ locallint:
2931
@golangci-lint run
3032

3133
cilint:
32-
@golangci-lint run --out-format=code-climate --issues-exit-code=0 --new-from-rev=HEAD~1 > code-quality-report.json
34+
@golangci-lint run -v --out-format=code-climate --new-from-rev=master --issues-exit-code=0 > code-quality-report.json
3335

3436
test:
3537
@go test -short ./...

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/aztechian/bridgr
22

33
require (
44
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
5-
github.com/aws/aws-sdk-go v1.32.6
5+
github.com/aws/aws-sdk-go v1.32.9
66
github.com/davecgh/go-spew v1.1.1
77
github.com/docker/distribution v2.7.1+incompatible
88
github.com/docker/docker v1.13.1

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:o
5656
github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
5757
github.com/aws/aws-sdk-go v1.32.6 h1:HoswAabUWgnrUF7X/9dr4WRgrr8DyscxXvTDm7Qw/5c=
5858
github.com/aws/aws-sdk-go v1.32.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
59+
github.com/aws/aws-sdk-go v1.32.9 h1:ai+NZsCV+Z97+jqIKya49gbCObOay9FKww0/VCNuXug=
60+
github.com/aws/aws-sdk-go v1.32.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
5961
github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
6062
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
6163
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=

0 commit comments

Comments
 (0)