Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-pq
Commits
4497b283
Commit
4497b283
authored
Jun 01, 2021
by
web3-bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update .github/workflows/go-check.yml
parent
bca88094
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
13 deletions
+22
-13
.github/workflows/go-check.yml
.github/workflows/go-check.yml
+22
-13
No files found.
.github/workflows/go-check.yml
View file @
4497b283
...
@@ -2,26 +2,31 @@
...
@@ -2,26 +2,31 @@
# 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
#
v
2020.2.
2
run
:
go install honnef.co/go/tools/cmd/staticcheck@
434f5f3816b358fe468fa83dcba62d794e7fe04b
# 202
1.1 (v
0.2.
0)
-
name
:
Check that go.mod is tidy
-
name
:
Check that go.mod is tidy
run
:
|
uses
:
protocol/multiple-go-modules@v1.0
go mod tidy
with
:
if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then
run
:
|
echo "go.sum was added by go mod tidy"
go mod tidy
exit 1
if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then
fi
echo "go.sum was added by go mod tidy"
git diff --exit-code -- go.sum go.mod
exit 1
fi
git diff --exit-code -- go.sum go.mod
-
name
:
gofmt
-
name
:
gofmt
if
:
${{ success() || failure() }}
# run this step even if the previous one failed
if
:
${{ success() || failure() }}
# run this step even if the previous one failed
run
:
|
run
:
|
...
@@ -32,10 +37,14 @@ jobs:
...
@@ -32,10 +37,14 @@ 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
run
:
go vet ./...
uses
:
protocol/multiple-go-modules@v1.0
with
:
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
run
:
|
uses
:
protocol/multiple-go-modules@v1.0
set -o pipefail
with
:
staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g'
run
:
|
set -o pipefail
staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment