git.iko.soy/typeable/oauth2-proxy
on master help sign in
Update CI to separate linting and testing
bc93198Joel Speed
.travis.yml+10−2
@@ -2,10 +2,18 @@ language: go
2go:
2go:
3 - 1.8.x
3 - 1.8.x
4 - 1.9.x
4 - 1.9.x
5−script:
5+ - 1.10.x
6+install:
7+ # Fetch dependencies
6 - wget -O dep https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64
8 - wget -O dep https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64
7 - chmod +x dep
9 - chmod +x dep
8− - ./dep ensure
10+ - ./dep ensure --vendor-only
11+script:
12+ # Lint
13+ - go get -u github.com/alecthomas/gometalinter
14+ - gometalinter --install
15+ - ./lint.sh
16+ # Run tests
9 - ./test.sh
17 - ./test.sh
10sudo: false
18sudo: false
11notifications:
19notifications:
CHANGELOG.md+2
@@ -2,6 +2,8 @@
2
2
3## Changes since v2.2:
3## Changes since v2.2:
4
4
5+- Update CI scripts to separate linting and testing
6+ - Now using `gometalinter` for linting
5- Move Go import path from `github.com/bitly/oauth2_proxy` to `github.com/pusher/oauth2_proxy`
7- Move Go import path from `github.com/bitly/oauth2_proxy` to `github.com/pusher/oauth2_proxy`
6- Repository forked on 27/11/18
8- Repository forked on 27/11/18
7 - README updated to include note that this repository is forked
9 - README updated to include note that this repository is forked
lint.shnew file+11
@@ -0,0 +1,11 @@
1+#!/bin/bash
2+gometalinter --vendor --disable-all \
3+--enable=vet \
4+--enable=vetshadow \
5+--enable=golint \
6+--enable=ineffassign \
7+--enable=goconst \
8+--enable=deadcode \
9+--enable=gofmt \
10+--enable=goimports \
11+--tests ./...
test.sh+1−13
@@ -1,14 +1,2 @@
1#!/bin/bash
1#!/bin/bash
2−EXIT_CODE=0
3−echo "gofmt"
4−diff -u <(echo -n) <(gofmt -d $(find . -type f -name '*.go' -not -path "./vendor/*")) || EXIT_CODE=1
5−for pkg in $(go list ./... | grep -v '/vendor/' ); do
2+go test -v -race $(go list ./... | grep -v /vendor/)
6− echo "testing $pkg"
7− echo "go vet $pkg"
8− go vet "$pkg" || EXIT_CODE=1
9− echo "go test -v $pkg"
10− go test -v -timeout 90s "$pkg" || EXIT_CODE=1
11− echo "go test -v -race $pkg"
12− GOMAXPROCS=4 go test -v -timeout 90s0s -race "$pkg" || EXIT_CODE=1
13−done
14−exit $EXIT_CODE