Skip to content

Commit

Permalink
Merge pull request #117 from terraform-providers/improved-travis
Browse files Browse the repository at this point in the history
Improved travis
  • Loading branch information
marinsalinas authored Apr 24, 2020
2 parents 711e366 + 1f178be commit d439c69
Show file tree
Hide file tree
Showing 1,468 changed files with 307,056 additions and 3,917 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ terraform-provider-nutanix
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

#exclude vendor
!vendor/**

# autogenerated fies
*.autogenerated.*

8 changes: 7 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,20 @@ linters:
- gocognit
- godox
- wsl
- nestif
- godot

issues:
exclude:
- composite literal uses unkeyed fields
exclude-rules:
- path: _test\.go
linters:
- testpackage
# part of the golangci govet package is picking up things that go vet doesn't. Seems flaky, shutting that specific error off

run:
# which dirs to skip: they won't be analyzed;
skip-dirs:
- vendor
- future
- future
42 changes: 17 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,26 @@ sudo: required
services:
- docker
language: go
go:
- "1.12.x"

git:
depth: 1


install:
# This script is used by the Travis build to install a cookie for
# go.googlesource.com so rate limits are higher when using `go get` to fetch
# packages that live there.
# See: https://github.com/golang/go/issues/12933
- bash scripts/gogetcookie.sh
- make tools

script:
- make lint
- make test
- make website-lint
- make website-test

#branches:
# only:
# - master

matrix:
fast_finish: true
allow_failures:
- go: tip
include:
- go: "1.13.x"
name: "Code Lint"
script: make lint
- go: "1.13.x"
name: "Code UnitTest"
script: make test
- go: "1.13.x"
name: "Website"
#- make website-test #commented until Terraform Provider Program Validation
script: make website-lint

env:
- GOFLAGS=-mod=vendor GO111MODULE=on
global:
- GOFLAGS=-mod=vendor

install:
- make tools
8 changes: 4 additions & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build: fmtcheck

test: fmtcheck
go test $(TEST) -timeout=30s -parallel=4

testacc: fmtcheck
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m -coverprofile c.out
go tool cover -html=c.out
Expand All @@ -32,9 +32,9 @@ lint: fmtcheck
@GOGC=30 golangci-lint run --timeout=30m

tools:
GO111MODULE=off go get -u github.com/client9/misspell/cmd/misspell
GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
GO111MODULE=off go get github.com/mitchellh/gox
GO111MODULE=on go install github.com/client9/misspell/cmd/misspell
GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint
GO111MODULE=on go install github.com/mitchellh/gox

vet:
@echo "go vet ."
Expand Down
8 changes: 3 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
module github.com/terraform-providers/terraform-provider-nutanix

require (
github.com/gogo/protobuf v1.2.0
github.com/golang/protobuf v1.3.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/client9/misspell v0.3.4
github.com/golangci/golangci-lint v1.25.0
github.com/hashicorp/terraform v0.12.3
github.com/mattn/go-isatty v0.0.7 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/gox v1.0.1
github.com/spf13/afero v1.2.2 // indirect
)

Expand Down
313 changes: 311 additions & 2 deletions go.sum

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions tools.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// +build tools

package main

import (
_ "github.com/client9/misspell/cmd/misspell"
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
_ "github.com/mitchellh/gox"
)
5 changes: 5 additions & 0 deletions vendor/github.com/BurntSushi/toml/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions vendor/github.com/BurntSushi/toml/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/github.com/BurntSushi/toml/COMPATIBLE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions vendor/github.com/BurntSushi/toml/COPYING

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions vendor/github.com/BurntSushi/toml/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d439c69

Please sign in to comment.