Skip to content

Commit e985132

Browse files
committed
fix: go deps cache in CI
1 parent c4f1ff7 commit e985132

File tree

2 files changed

+3
-31
lines changed

2 files changed

+3
-31
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,7 @@ jobs:
5252
uses: actions/setup-go@v5
5353
with:
5454
go-version: '1.24'
55-
56-
- name: Cache Go modules
57-
uses: actions/cache@v4
58-
with:
59-
path: |
60-
~/go/pkg/mod
61-
~/.cache/go-build
62-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
63-
restore-keys: |
64-
${{ runner.os }}-go-
55+
cache-dependency-path: backend/go.sum
6556

6657
- name: Install linting tools
6758
working-directory: backend
@@ -89,16 +80,7 @@ jobs:
8980
uses: actions/setup-go@v5
9081
with:
9182
go-version: '1.24'
92-
93-
- name: Cache Go modules
94-
uses: actions/cache@v4
95-
with:
96-
path: |
97-
~/go/pkg/mod
98-
~/.cache/go-build
99-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
100-
restore-keys: |
101-
${{ runner.os }}-go-
83+
cache-dependency-path: backend/go.sum
10284

10385
- name: Run tests
10486
working-directory: backend

.github/workflows/publish.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,7 @@ jobs:
3030
uses: actions/setup-go@v5
3131
with:
3232
go-version: '1.24'
33-
34-
- name: Cache Go modules
35-
if: matrix.component == 'backend'
36-
uses: actions/cache@v4
37-
with:
38-
path: |
39-
~/go/pkg/mod
40-
~/.cache/go-build
41-
key: ${{ runner.os }}-go-${{ hashFiles('backend/go.sum') }}
42-
restore-keys: |
43-
${{ runner.os }}-go-
33+
cache-dependency-path: backend/go.sum
4434

4535
- name: Install backend tools
4636
if: matrix.component == 'backend'

0 commit comments

Comments
 (0)