-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Michael Magrian <[email protected]> Co-authored-by: John Sartore <[email protected]>
- Loading branch information
1 parent
1191a7b
commit 82472ba
Showing
24 changed files
with
31,749 additions
and
1,051 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
language: go | ||
dist: xenial | ||
go: 1.13.x | ||
dist: focal | ||
|
||
go: | ||
- 1.18.x | ||
|
||
# Only run on main (still tests PRs) | ||
branches: | ||
only: | ||
- main | ||
|
||
cache: | ||
directories: | ||
- $HOME/.cache/go-build | ||
- $HOME/gopath/pkg/mod | ||
|
||
notifications: | ||
email: true | ||
|
||
|
@@ -15,29 +22,12 @@ env: | |
- GO111MODULE=on | ||
|
||
before_install: | ||
# To enable semantic-release, uncomment the next 4 lines | ||
# - sudo apt-get update | ||
# - sudo apt-get install python | ||
# - nvm install 12 | ||
# - npm install -g [email protected] | ||
#- '[ "${TRAVIS_PULL_REQUEST}" == "false" ] && openssl aes-256-cbc -K $my_key -iv $my_iv -in myservice.env.enc -out myservice.env -d || true' | ||
- sudo apt-get update | ||
- pyenv global 3.8 | ||
|
||
install: | ||
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.49.0 | ||
- curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(go env GOPATH)/bin | ||
|
||
script: | ||
- go build ./... | ||
- go test ./... | ||
- ./test-integration.sh | ||
|
||
# To enable semantic-release, uncomment these sections. | ||
# before_deploy: | ||
# - pip install --user bump2version | ||
# - npm install @semantic-release/changelog | ||
# - npm install @semantic-release/exec | ||
# - npm install @semantic-release/git | ||
# - npm install @semantic-release/github | ||
# | ||
# deploy: | ||
# - provider: script | ||
# script: npx semantic-release | ||
# skip_cleanup: true | ||
# on: | ||
# branch: master | ||
- make travis-ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,30 @@ | ||
# Makefile to build go-sdk-template | ||
# Makefile to build the project | ||
GO=go | ||
LINT=golangci-lint | ||
GOSEC=gosec | ||
|
||
all: build unittest lint tidy | ||
COVERAGE = -coverprofile=coverage.txt -covermode=atomic | ||
|
||
travis-ci: build alltest lint tidy | ||
all: tidy test lint scan-gosec | ||
travis-ci: test-cov lint scan-gosec tidy | ||
|
||
build: | ||
go build ./... | ||
test: | ||
${GO} test `${GO} list ./...` | ||
|
||
unittest: | ||
go test `go list ./... | grep -v samples` | ||
test-cov: | ||
${GO} test `${GO} list ./...` ${COVERAGE} | ||
|
||
alltest: | ||
go test `go list ./... | grep -v samples` -v -tags=integration | ||
test-int: | ||
${GO} test `${GO} list ./...` -tags=integration | ||
|
||
test-int-cov: | ||
${GO} test `${GO} list ./...` -tags=integration ${COVERAGE} | ||
|
||
lint: | ||
golangci-lint run | ||
${LINT} run | ||
|
||
scan-gosec: | ||
${GOSEC} -conf gosec.json -exclude-dir=example/v1 -exclude-dir=example/v2 ./... | ||
|
||
tidy: | ||
go mod tidy | ||
${GO} mod tidy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.