Commit 4497b283 authored by web3-bot's avatar web3-bot

update .github/workflows/go-check.yml

parent bca88094
...@@ -2,19 +2,24 @@ ...@@ -2,19 +2,24 @@
# See https://github.com/protocol/.github/ for details. # See https://github.com/protocol/.github/ for details.
on: [push, pull_request] on: [push, pull_request]
name: Go Checks
jobs: jobs:
unit: unit:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Go checks name: All
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-go@v2 - uses: actions/setup-go@v2
with: with:
go-version: "1.16.x" go-version: "1.16.x"
- name: Install staticcheck - name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@be534f007836a777104a15f2456cd1fffd3ddee8 # v2020.2.2 run: go install honnef.co/go/tools/cmd/staticcheck@434f5f3816b358fe468fa83dcba62d794e7fe04b # 2021.1 (v0.2.0)
- name: Check that go.mod is tidy - name: Check that go.mod is tidy
uses: protocol/multiple-go-modules@v1.0
with:
run: | run: |
go mod tidy go mod tidy
if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then
...@@ -32,9 +37,13 @@ jobs: ...@@ -32,9 +37,13 @@ jobs:
fi fi
- name: go vet - name: go vet
if: ${{ success() || failure() }} # run this step even if the previous one failed if: ${{ success() || failure() }} # run this step even if the previous one failed
uses: protocol/multiple-go-modules@v1.0
with:
run: go vet ./... run: go vet ./...
- name: staticcheck - name: staticcheck
if: ${{ success() || failure() }} # run this step even if the previous one failed if: ${{ success() || failure() }} # run this step even if the previous one failed
uses: protocol/multiple-go-modules@v1.0
with:
run: | run: |
set -o pipefail set -o pipefail
staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g' staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment