Skip to content

Commit deb02cb

Browse files
authored
add caching for tests
1 parent c541ec1 commit deb02cb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ jobs:
1212
uses: actions/setup-go@v3
1313
with:
1414
go-version: ${{ matrix.go-version }}
15+
- name: Setup Golang caches
16+
uses: actions/cache@v3
17+
with:
18+
# In order:
19+
# * Module download cache
20+
# * Build cache (Linux)
21+
# * Build cache (Mac)
22+
# * Build cache (Windows)
23+
path: |
24+
~/go/pkg/mod
25+
~/.cache/go-build
26+
~/Library/Caches/go-build
27+
~\AppData\Local\go-build
28+
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
29+
restore-keys: |
30+
${{ runner.os }}-go-${{ matrix.go-version }}-
1531
- name: Fetch Repository
1632
uses: actions/checkout@v3
1733
- name: Run Test

0 commit comments

Comments
 (0)