Skip to content

Commit

Permalink
feature(ci): update gomod cache name
Browse files Browse the repository at this point in the history
  • Loading branch information
HatsuneMiku3939 committed May 17, 2022
1 parent 8104dcb commit 64110b6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Unit Test

env:
GOVERSION: '1.17'
GOMOD_CACHE_NAME: 'go-cache'

on:
pull_request:
Expand All @@ -23,9 +24,9 @@ jobs:
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ env.GOMOD_CACHE_NAME }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
${{ runner.os }}-${{ env.GOMOD_CACHE_NAME }}-
- name: Download go module
run: go mod download
Expand Down Expand Up @@ -54,9 +55,9 @@ jobs:
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ env.GOMOD_CACHE_NAME }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
${{ runner.os }}-${{ env.GOMOD_CACHE_NAME }}-
- name: Test
run: make test
Expand All @@ -78,9 +79,9 @@ jobs:
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ env.GOMOD_CACHE_NAME }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
${{ runner.os }}-${{ env.GOMOD_CACHE_NAME }}-
- name: Lint
run: make lint-ci

0 comments on commit 64110b6

Please sign in to comment.