Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Commit

Permalink
Problem: Travis CI is broken (#37)
Browse files Browse the repository at this point in the history
* Problem: tools versions are not fixed.

Solution: fix tools versions with tools.go.

* Problem: Travis CI is broken.

Solution: fix Travis CI.

* downgrade golangci-lint to 1.10.2;
* run golangci-lint without modules;
* allow failures with Go from master branch.
  • Loading branch information
AlekSi authored Nov 3, 2018
1 parent fd9d097 commit dae0962
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 15 deletions.
14 changes: 6 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,20 @@ env:
- GO111MODULE=off
- GO111MODULE=on

matrix:
allow_failures:
- go: master

go_import_path: gosh-lang.org/gosh

install:
- make init
- git checkout go.mod go.sum

script:
- gofmt -w -s .
- make test
- git diff --exit-code

# golangci-lint does not work with modules yet
# https://github.com/golangci/golangci-lint/issues/178
- if [ "$GO111MODULE" = "on" ]; then
go mod vendor -v;
fi
- env GO111MODULE=off make check;
- make check

after_success:
- bash <(curl -s https://codecov.io/bash) -f cover.out -X fix -e GO111MODULE
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
all: test

init:
go get -u -v golang.org/x/tools/cmd/stringer \
github.com/dvyukov/go-fuzz/go-fuzz-build \
github.com/dvyukov/go-fuzz/go-fuzz \
github.com/golangci/golangci-lint/cmd/golangci-lint

go get -t -v ./...
env GO111MODULE=on go mod vendor -v
go install -v ./vendor/github.com/dvyukov/go-fuzz/go-fuzz \
./vendor/github.com/dvyukov/go-fuzz/go-fuzz-build \
./vendor/golang.org/x/tools/cmd/stringer
curl https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.10.2

install:
go generate ./...
Expand All @@ -22,4 +21,4 @@ test: install

check: install
go run misc/check_license.go
golangci-lint run ./...
env GO111MODULE=off golangci-lint run
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ require (
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc // indirect
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf // indirect
github.com/davecgh/go-spew v1.1.1
github.com/dvyukov/go-fuzz v0.0.0-20180902053217-4aff8368ef19
github.com/elazarl/go-bindata-assetfs v1.0.0 // indirect
github.com/peterh/liner v1.1.0
github.com/pmezard/go-difflib v1.0.0
github.com/stephens2424/writerset v0.0.0-20150719204953-fe01f9c9e73f // indirect
github.com/stretchr/testify v1.2.2
golang.org/x/tools v0.0.0-20181102223251-96e9e165b75e
gopkg.in/alecthomas/kingpin.v2 v2.2.6
)
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZq
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dvyukov/go-fuzz v0.0.0-20180902053217-4aff8368ef19 h1:5cILK9eRg5plZe3r/1tGYjiET+0CrVfYE4Pk9fxDiHA=
github.com/dvyukov/go-fuzz v0.0.0-20180902053217-4aff8368ef19/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw=
github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk=
github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
github.com/mattn/go-runewidth v0.0.3 h1:a+kO+98RDGEfo6asOGMmpodZq4FNtnGP54yps8BzLR4=
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/peterh/liner v1.1.0 h1:f+aAedNJA6uk7+6rXsYBnhdo4Xux7ESLe+kcuVUF5os=
github.com/peterh/liner v1.1.0/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stephens2424/writerset v0.0.0-20150719204953-fe01f9c9e73f h1:zqx7RIcB8hou3dNZj7sK4F2RGp/0EE8ePYACQviNDIo=
github.com/stephens2424/writerset v0.0.0-20150719204953-fe01f9c9e73f/go.mod h1:5cbQWzip+vmCLo5o5nC17PTS8cNJpg68aJ4ETp6lOF0=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/tools v0.0.0-20181102223251-96e9e165b75e h1:mWs/o39kL0UjStxJimqI7o6rKvqDZcAQxqnwG6lmxfc=
golang.org/x/tools v0.0.0-20181102223251-96e9e165b75e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
16 changes: 16 additions & 0 deletions tools.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Gosh programming language.
// Copyright (c) 2018 Alexey Palazhchenko and contributors.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

// +build tools

package main

import (
_ "github.com/dvyukov/go-fuzz/go-fuzz"
_ "github.com/dvyukov/go-fuzz/go-fuzz-build"
_ "golang.org/x/tools/cmd/stringer"
)

0 comments on commit dae0962

Please sign in to comment.