enable github actions
This commit is contained in:
30
.github/workflows/pr.yml
vendored
Normal file
30
.github/workflows/pr.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
name: PR sanity check
|
||||||
|
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prcheck:
|
||||||
|
name: PR sanity check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.18'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
go version
|
||||||
|
go get -u golang.org/x/lint/golint
|
||||||
|
- name: Run vet & lint
|
||||||
|
run: |
|
||||||
|
go vet .
|
||||||
|
golint .
|
||||||
|
- name: golangci-lint
|
||||||
|
uses: golangci/golangci-lint-action@v3
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
# # Run testing on the code
|
||||||
|
# - name: Run testing
|
||||||
|
# run: cd test && go test -v
|
||||||
Reference in New Issue
Block a user