Skip to content

Commit af253a5

Browse files
committed
ci: use go workspace for cross-module test resolution
CI workflows now run from the workspace root using go.work so that local replace directives resolve correctly. This fixes the framework test failure where contract v0.8.0 from the module proxy was missing the new CreatedAt interface method.
1 parent 9549f03 commit af253a5

3 files changed

Lines changed: 11 additions & 18 deletions

File tree

.github/workflows/framework.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,30 @@ on:
55
branches: ["main"]
66
paths:
77
- .github/workflows/framework.yml
8+
- contract/**
89
- framework/**
910
pull_request:
1011
branches: ["main"]
1112
paths:
1213
- .github/workflows/framework.yml
14+
- contract/**
1315
- framework/**
1416

1517
jobs:
1618
test:
1719
name: Unit Tests
1820
runs-on: ubuntu-latest
19-
defaults:
20-
run:
21-
working-directory: ./framework
2221
steps:
2322
- uses: actions/checkout@v4
2423

2524
- name: Set up Go
2625
uses: actions/setup-go@v5
2726
with:
28-
go-version-file: "framework/go.mod"
27+
go-version-file: "go.work"
2928
cache-dependency-path: "framework/go.sum"
3029

3130
- name: Download Dependencies
32-
run: go mod download
31+
run: go work sync
3332

3433
- name: Test
35-
run: go test -v ./...
34+
run: go test -v ./framework/...

.github/workflows/problem.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,17 @@ jobs:
1616
test:
1717
name: Unit Tests
1818
runs-on: ubuntu-latest
19-
defaults:
20-
run:
21-
working-directory: ./problem
2219
steps:
2320
- uses: actions/checkout@v4
2421

2522
- name: Set up Go
2623
uses: actions/setup-go@v5
2724
with:
28-
go-version-file: "problem/go.mod"
25+
go-version-file: "go.work"
2926
cache-dependency-path: "problem/go.sum"
3027

3128
- name: Download Dependencies
32-
run: go mod download
29+
run: go work sync
3330

3431
- name: Test
35-
run: go test -v ./...
32+
run: go test -v ./problem/...

.github/workflows/router.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,17 @@ jobs:
1616
test:
1717
name: Unit Tests
1818
runs-on: ubuntu-latest
19-
defaults:
20-
run:
21-
working-directory: ./router
2219
steps:
2320
- uses: actions/checkout@v4
2421

2522
- name: Set up Go
2623
uses: actions/setup-go@v5
2724
with:
28-
go-version-file: "router/go.mod"
25+
go-version-file: "go.work"
2926
cache-dependency-path: "router/go.sum"
3027

3128
- name: Download Dependencies
32-
run: go mod download
29+
run: go work sync
3330

3431
- name: Test
35-
run: go test -v ./...
32+
run: go test -v ./router/...

0 commit comments

Comments
 (0)