-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
575c421
commit f4b59c0
Showing
5 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
* @auth0/golang-oss-approvers |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: | ||
type: [created, synchronize, reopened] | ||
branches: | ||
- '*' | ||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: install go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14 | ||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
args: -v --timeout=5m --exclude SA1029 | ||
skip-build-cache: true | ||
skip-go-installation: true | ||
skip-pkg-cache: true |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: test | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: | ||
type: [created, synchronize, reopened] | ||
branches: | ||
- '*' | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: install go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14 | ||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
- name: test | ||
run: make test | ||
- name: upload coverage to codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: coverage.out | ||
fail_ci_if_error: true | ||
verbose: true |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.DEFAULT_GOAL := help | ||
|
||
.PHONY: test | ||
test: ## Run tests. | ||
go test -cover -covermode=atomic -coverprofile=coverage.out ./... | ||
|
||
.PHONY: lint | ||
lint: ## Run golangci-lint. | ||
golangci-lint run -v --timeout=5m --exclude SA1029 | ||
|
||
.PHONY: help | ||
help: | ||
@grep -E '^[%a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |