Skip to content

Commit 3d3c94b

Browse files
committed
feat(workflows): Fix test workflow and remove working directory
1 parent 8700743 commit 3d3c94b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [ main ]
66
pull_request:
77
branches: [ main ]
8-
workflow_dispatch: # Allows manual trigger from GitHub UI
8+
workflow_dispatch:
99

1010
jobs:
1111
test:
@@ -21,25 +21,26 @@ jobs:
2121
go-version: '1.24.3'
2222

2323
- name: Cache Go modules
24-
working-directory: services/bounty-service
2524
uses: actions/cache@v3
2625
with:
2726
path: ~/go/pkg/mod
28-
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
27+
key: ${{ runner.os }}-go-${{ hashFiles('services/bounty-service/go.sum') }}
2928
restore-keys: |
3029
${{ runner.os }}-go-
3130
3231
- name: Download dependencies
33-
working-directory: services/bounty-service
34-
run: go mod download
32+
run: |
33+
cd services/bounty-service
34+
go mod download
3535
3636
- name: Run tests
37-
working-directory: services/bounty-service
38-
run: go test -v ./...
37+
run: |
38+
cd services/bounty-service
39+
go test -v ./...
3940
4041
- name: Run tests with coverage
41-
working-directory: services/bounty-service
4242
run: |
43+
cd services/bounty-service
4344
go test -v -coverprofile=coverage.out ./...
4445
mv coverage.out ${{ github.workspace }}/coverage.out
4546
@@ -65,5 +66,4 @@ jobs:
6566
uses: golangci/golangci-lint-action@v3
6667
with:
6768
version: latest
68-
working-directory: services/bounty-service
69-
args: --timeout=5m
69+
args: --timeout=5m --path-prefix=services/bounty-service

0 commit comments

Comments
 (0)