Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit 2fc0a41

Browse files
committed
add .github/workflows/go-check.yml
1 parent afe3509 commit 2fc0a41

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/go-check.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# File managed by web3-bot. DO NOT EDIT.
2+
# See https://github.com/protocol/.github/ for details.
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
unit:
8+
runs-on: ubuntu-latest
9+
name: Go checks
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-go@v2
13+
with:
14+
go-version: "1.16.x"
15+
- name: Install staticcheck
16+
run: go install honnef.co/go/tools/cmd/staticcheck@be534f007836a777104a15f2456cd1fffd3ddee8 # v2020.2.2
17+
- name: Check that go.mod is tidy
18+
run: |
19+
cp go.mod go.mod.orig
20+
cp go.sum go.sum.orig
21+
go mod tidy
22+
diff go.mod go.mod.orig
23+
diff go.sum go.sum.orig
24+
- name: go vet
25+
if: ${{ success() || failure() }} # run this step even if the previous one failed
26+
run: go vet ./...
27+
- name: staticcheck
28+
if: ${{ success() || failure() }} # run this step even if the previous one failed
29+
run: |
30+
set -o pipefail
31+
staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g'
32+

0 commit comments

Comments
 (0)