Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved travis #117

Merged
merged 4 commits into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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