Chore: actions split lint and release

This commit is contained in:
gVisor bot 2021-10-11 20:08:18 +08:00
parent 653f2de2c0
commit 81c327192c
2 changed files with 15 additions and 7 deletions

12
.github/workflows/linter.yml vendored Normal file
View file

@ -0,0 +1,12 @@
name: Linter
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
args: --disable-all -E govet -E gofumpt -E megacheck ./...

View file

@ -1,9 +1,7 @@
name: Go name: Release
on: [push, pull_request] on: [push]
jobs: jobs:
build: build:
name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Get latest go version - name: Get latest go version
@ -27,11 +25,9 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-go- ${{ runner.os }}-go-
- name: Get dependencies, run test and static check - name: Get dependencies, run test
run: | run: |
go test ./... go test ./...
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint run --disable-all -E govet -E gofumpt -E megacheck ./...
- name: Build - name: Build
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')