From b4e0e6fa0fc9faf5c1ca4c7e52b79bf4c44c0605 Mon Sep 17 00:00:00 2001 From: fumiama Date: Fri, 27 Aug 2021 16:36:29 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E5=8D=87=E7=BA=A7lint=E5=88=B01.17?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pull.yml | 17 ++++++++++++++++- .github/workflows/push.yml | 17 ++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index dcf28c07..a4c93246 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -5,7 +5,22 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Cache Go + id: cache + uses: actions/cache@v2 + with: + # A list of files, directories, and wildcard patterns to cache and restore + path: ~/go/pkg/mod + key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }} + - name: golangci-lint uses: golangci/golangci-lint-action@master with: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 67ecff1a..3b7f8ae5 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -5,7 +5,22 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Cache Go + id: cache + uses: actions/cache@v2 + with: + # A list of files, directories, and wildcard patterns to cache and restore + path: ~/go/pkg/mod + key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }} + - name: golangci-lint uses: golangci/golangci-lint-action@master with: