Skip to content

Commit a4cb141

Browse files
committed
Check the examples against an absolute source path, and move the workflow's actions off Node 20
In CI the Mobium checkout is ./mobium, and a relative path in the generated go.mod's replace directive is refused.
1 parent d038f15 commit a4cb141

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

‎.github/workflows/pages.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,31 @@ jobs:
2323
build:
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v5
2727

2828
- name: Which Mobium
2929
id: ref
3030
run: echo "ref=$(cat mobium.ref)" >> "$GITHUB_OUTPUT"
3131

32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v5
3333
with:
3434
repository: mobiumdev/mobium
3535
ref: ${{ steps.ref.outputs.ref }}
3636
path: mobium
3737

38-
- uses: actions/setup-go@v5
38+
- uses: actions/setup-go@v6
3939
with:
4040
go-version-file: mobium/go.mod
4141
cache-dependency-path: mobium/go.sum
42-
- uses: actions/setup-node@v4
42+
- uses: actions/setup-node@v5
4343
with:
4444
node-version: 22
4545
cache: npm
46-
- uses: actions/setup-java@v4
46+
- uses: actions/setup-java@v5
4747
with:
4848
distribution: temurin
4949
java-version: 21
50-
- uses: actions/setup-dotnet@v4
50+
- uses: actions/setup-dotnet@v5
5151
with:
5252
dotnet-version: 8.0.x
5353

@@ -70,7 +70,7 @@ jobs:
7070

7171
- run: npm run build
7272

73-
- uses: actions/upload-pages-artifact@v3
73+
- uses: actions/upload-pages-artifact@v4
7474
with:
7575
path: build
7676

‎scripts/check_examples.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,9 @@ def main():
376376
ap.add_argument("--src", default=os.environ.get("MOBIUM_SRC", "../mobium"))
377377
ap.add_argument("--lang", action="append", choices=LANGS)
378378
a = ap.parse_args()
379+
# Absolute: go.mod's replace and javac's sourcepath are read from a
380+
# temporary directory, where a relative path means something else.
381+
a.src = str(Path(a.src).expanduser().resolve())
379382
data, canon = load()
380383
errs = check_canonical(data, canon)
381384
print(f"canonical: {sum(len(v) for v in canon.values())} scenarios, {len(errs)} problems")

0 commit comments

Comments
 (0)