move lint to standalone pipeline (#123)

This commit is contained in:
Boshi Lian 2023-01-05 05:03:06 -08:00 committed by GitHub
parent 4c700aef49
commit e14b6d340b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 9 deletions

View file

@ -16,14 +16,14 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.19
go-version: ^1.19
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
submodules: 'recursive'
# https://github.com/mvdan/github-actions-golang
- uses: actions/cache@v3
@ -39,13 +39,6 @@ jobs:
with:
setAllVars: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=60m -E gofmt --verbose --print-resources-usage --build-tags full
env:
GOGC: "10"
- name: Test lib ssh
run: go test -v -cover ./...
working-directory: crypto/ssh

34
.github/workflows/golangci-lint.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- master
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.19
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=60m -E gofmt --verbose --print-resources-usage --build-tags full
env:
GOGC: "10"