Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3f130af1c | ||
|
|
f953915e15 |
No files matched your search
@@ -66,37 +66,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
- name: Get StaticCheck
|
|
||||||
if: ${{ matrix.os == 'ubuntu' }}
|
|
||||||
run: go install honnef.co/go/tools/cmd/staticcheck@latest
|
|
||||||
|
|
||||||
- name: Gomod
|
|
||||||
if: ${{ matrix.os == 'ubuntu' }}
|
|
||||||
run: |
|
|
||||||
go mod tidy
|
|
||||||
if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then
|
|
||||||
echo "go.sum was added by go mod tidy"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
git diff --exit-code -- go.sum go.mod
|
|
||||||
|
|
||||||
- name: Gofmt
|
|
||||||
if: ${{ matrix.os == 'ubuntu' && (success() || failure()) }} # run this step even if the previous one failed
|
|
||||||
run: |
|
|
||||||
out=$(gofmt -s -l .)
|
|
||||||
if [[ -n "$out" ]]; then
|
|
||||||
echo $out | awk '{print "::error file=" $0 ",line=0,col=0::File is not gofmt-ed."}'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Vet
|
|
||||||
if: ${{ matrix.os == 'ubuntu' && (success() || failure()) }} # run this step even if the previous one failed
|
|
||||||
run: go vet ./...
|
|
||||||
|
|
||||||
- name: StaticCheck
|
|
||||||
if: ${{ matrix.os == 'ubuntu' && (success() || failure()) }} # run this step even if the previous one failed
|
|
||||||
run: staticcheck ./...
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: go test ./...
|
run: go test ./...
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ on:
|
|||||||
workflows: ["Run tests"]
|
workflows: ["Run tests"]
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
version:
|
version:
|
||||||
|
|||||||
Reference in new issue
Block a user