Skip to content

Commit

Permalink
ci: use action/setup-go's cache
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Aug 21, 2022
1 parent dbf85f6 commit ab03122
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/test.yml
Expand Up @@ -13,11 +13,12 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version: '1.17'

- uses: actions/checkout@v3
cache: true

- uses: golangci/golangci-lint-action@v3.2.0
with:
Expand All @@ -41,17 +42,12 @@ jobs:
runs-on: ${{ matrix.platform }}-latest
steps:

- uses: actions/setup-go@v3
with:
go-version: 1.${{ matrix.go }}.x

- uses: actions/checkout@v3

- uses: actions/cache@v3
- uses: actions/setup-go@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-1.${{ matrix.go }}.x-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-1.${{ matrix.go }}.x-
go-version: 1.${{ matrix.go }}.x
cache: true

- run: |
export GOBIN=$HOME/go/bin
Expand Down

0 comments on commit ab03122

Please sign in to comment.