Skip to content

Commit

Permalink
Replace action used for shellcheck and golangci-lint checks (#4)
Browse files Browse the repository at this point in the history
Signed-off-by: Ed Warnicke <[email protected]>
  • Loading branch information
edwarnicke authored and fkautz committed Jan 23, 2020
1 parent 631641c commit 8e5425a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 37 deletions.
66 changes: 30 additions & 36 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr-for-updates.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
name: Pull Request on update/* Branch Push
on:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@

# Dependency directories (remove the comment below to include it)
# vendor/

.idea/

0 comments on commit 8e5425a

Please sign in to comment.