From 81c327192c287e9a4de7ce7e7d4b433469a59749 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Mon, 11 Oct 2021 20:08:18 +0800 Subject: [PATCH] Chore: actions split lint and release --- .github/workflows/linter.yml | 12 ++++++++++++ .github/workflows/{go.yml => release.yml} | 10 +++------- 2 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/linter.yml rename .github/workflows/{go.yml => release.yml} (81%) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 00000000..26d318c3 --- /dev/null +++ b/.github/workflows/linter.yml @@ -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 ./... diff --git a/.github/workflows/go.yml b/.github/workflows/release.yml similarity index 81% rename from .github/workflows/go.yml rename to .github/workflows/release.yml index af6f9a91..d4bad8a3 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,7 @@ -name: Go -on: [push, pull_request] +name: Release +on: [push] jobs: - build: - name: Build runs-on: ubuntu-latest steps: - name: Get latest go version @@ -27,11 +25,9 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Get dependencies, run test and static check + - name: Get dependencies, run test run: | 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 if: startsWith(github.ref, 'refs/tags/')