Skip to content

Commit f0a70f9

Browse files
committed
fix(ci): avoid overlapping Go cache restores
Signed-off-by: Senol Colak <senol.colak@sap.com>
1 parent e5c34b5 commit f0a70f9

4 files changed

Lines changed: 18 additions & 41 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,9 @@ jobs:
2020
uses: actions/setup-go@v6
2121
with:
2222
go-version: '1.27.3'
23-
24-
- name: Cache Go modules
25-
uses: actions/cache@v5
26-
with:
27-
path: ~/go/pkg/mod
28-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
29-
restore-keys: |
30-
${{ runner.os }}-go-
23+
cache-dependency-path: |
24+
go.sum
25+
tools/go.sum
3126
3227
- name: Build binary
3328
run: make build
@@ -102,14 +97,9 @@ jobs:
10297
uses: actions/setup-go@v6
10398
with:
10499
go-version: '1.27.3'
105-
106-
- name: Cache Go modules
107-
uses: actions/cache@v5
108-
with:
109-
path: ~/go/pkg/mod
110-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
111-
restore-keys: |
112-
${{ runner.os }}-go-
100+
cache-dependency-path: |
101+
go.sum
102+
tools/go.sum
113103
114104
- name: Run unit tests with race detector
115105
run: go test -race -coverprofile=coverage.txt -covermode=atomic $(go list ./... | grep -v '/test/contract')
@@ -137,14 +127,9 @@ jobs:
137127
uses: actions/setup-go@v6
138128
with:
139129
go-version: '1.27.3'
140-
141-
- name: Cache Go modules
142-
uses: actions/cache@v5
143-
with:
144-
path: ~/go/pkg/mod
145-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
146-
restore-keys: |
147-
${{ runner.os }}-go-
130+
cache-dependency-path: |
131+
go.sum
132+
tools/go.sum
148133
149134
- name: Start lightstack services
150135
run: |

‎.github/workflows/nightly.yml‎

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,9 @@ jobs:
4141
uses: actions/setup-go@v6
4242
with:
4343
go-version: '1.27.3'
44-
45-
- name: Cache Go modules
46-
uses: actions/cache@v5
47-
with:
48-
path: ~/go/pkg/mod
49-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
50-
restore-keys: |
51-
${{ runner.os }}-go-
44+
cache-dependency-path: |
45+
go.sum
46+
tools/go.sum
5247
5348
- name: Build binary
5449
run: make build
@@ -150,14 +145,9 @@ jobs:
150145
uses: actions/setup-go@v6
151146
with:
152147
go-version: '1.27.3'
153-
154-
- name: Cache Go modules
155-
uses: actions/cache@v5
156-
with:
157-
path: ~/go/pkg/mod
158-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
159-
restore-keys: |
160-
${{ runner.os }}-go-
148+
cache-dependency-path: |
149+
go.sum
150+
tools/go.sum
161151
162152
- name: Build binary
163153
run: make build

‎.github/workflows/security.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
with:
2727
go-version: '1.27.3'
2828
cache: true
29+
cache-dependency-path: |
30+
go.sum
31+
tools/go.sum
2932
3033
- name: Scan Go code and pinned development tool
3134
run: |

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ cirros*.img
8888
# HOST_TESTING_REAL_MODE.md generates this (ideally under /tmp); guard the repo-root path too.
8989
/lightstack-real-values.yaml
9090

91-
# Keep important root docs
9291
# Python harness regression tests
9392
__pycache__/
9493

0 commit comments

Comments
 (0)