-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
20 changed files
with
150 additions
and
101 deletions.
There are no files selected for viewing
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,94 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' | ||
pull_request: | ||
|
||
jobs: | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- name: Cache Go Modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-go-modules | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }} | ||
- name: Install tools | ||
if: steps.tool-cache.outputs.cache-hit != 'true' | ||
run: make install-tools | ||
- name: Add Permissions to Tool Binaries | ||
run: chmod -R +x ~/go/bin | ||
- name: Vet | ||
run: make vet | ||
- name: Lint | ||
run: make lint | ||
|
||
test-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- name: Cache Go Modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-go-modules | ||
with: | ||
path: ~/go/bin | ||
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }} | ||
- name: Run Unit Tests | ||
run: make test | ||
|
||
test-macos: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- name: Cache Go Modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-go-modules | ||
with: | ||
path: ~/go/bin | ||
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }} | ||
- name: Run Unit Tests | ||
run: make test | ||
|
||
test-windows: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.15 | ||
- name: Cache Go Modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-go-modules | ||
with: | ||
path: /Users/runneradmin/go/pkg/mod | ||
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }} | ||
- name: Run Unit Tests | ||
run: make test | ||
|
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 |
---|---|---|
|
@@ -13,3 +13,6 @@ linters: | |
- unparam | ||
- whitespace | ||
- ineffassign | ||
linters-settings: | ||
goconst: | ||
min-occurrences: 5 |
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 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 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 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 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 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 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 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 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 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 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.