-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace action used for shellcheck and golangci-lint checks (#4)
Signed-off-by: Ed Warnicke <[email protected]>
- Loading branch information
1 parent
631641c
commit 8e5425a
Showing
3 changed files
with
32 additions
and
37 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 |
---|---|---|
|
@@ -20,10 +20,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v1 | ||
- name: shellcheck | ||
uses: reviewdog/action-shellcheck@v1 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
reporter: github-check | ||
uses: azohra/[email protected] | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
|
@@ -34,32 +31,29 @@ jobs: | |
go-version: 1.13 | ||
- run: | | ||
go build -race ./... | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13 | ||
- name: Install gotestsum | ||
run: go get gotest.tools/[email protected] | ||
- name: Run tests | ||
run: | | ||
eval $(go env) | ||
mkdir -p ~/junit/ | ||
${GOPATH}/bin/gotestsum --junitfile ~/junit/unit-tests.xml -- -race -short $(go list ./...) | ||
# test: | ||
# name: test | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v1 | ||
# - uses: actions/setup-go@v1 | ||
# with: | ||
# go-version: 1.13 | ||
# - name: Install gotestsum | ||
# run: go get gotest.tools/[email protected] | ||
# - name: Run tests | ||
# run: | | ||
# eval $(go env) | ||
# mkdir -p ~/junit/ | ||
# ${GOPATH}/bin/gotestsum --junitfile ~/junit/unit-tests.xml -- -race -short $(go list ./...) | ||
golangci-lint: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
- name: golangci-lint | ||
uses: reviewdog/action-golangci-lint@v1 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
reporter: github-check | ||
uses: Mushus/golangci-linter@v1 | ||
|
||
excludeFmtErrorf: | ||
name: exclude fmt.Errorf | ||
|
@@ -83,19 +77,19 @@ jobs: | |
exit 1 | ||
fi | ||
done | ||
checkgomod: | ||
name: check go.mod and go.sum | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13 | ||
- run: go mod tidy | ||
- name: Check for changes in go.mod or go.sum | ||
run: | | ||
git diff --name-only --exit-code go.mod || ( echo "Run go tidy" && false ) | ||
git diff --name-only --exit-code go.sum || ( echo "Run go tidy" && false ) | ||
# checkgomod: | ||
# name: check go.mod and go.sum | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v1 | ||
# - uses: actions/setup-go@v1 | ||
# with: | ||
# go-version: 1.13 | ||
# - run: go mod tidy | ||
# - name: Check for changes in go.mod or go.sum | ||
# run: | | ||
# git diff --name-only --exit-code go.mod || ( echo "Run go tidy" && false ) | ||
# git diff --name-only --exit-code go.sum || ( echo "Run go tidy" && false ) | ||
license: | ||
name: license header check | ||
runs-on: ubuntu-latest | ||
|
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,4 +1,3 @@ | ||
|
||
--- | ||
name: Pull Request on update/* Branch Push | ||
on: | ||
|
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,5 @@ | |
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
.idea/ |