@@ -2,11 +2,49 @@ name: CI
2
2
on :
3
3
pull_request :
4
4
5
+ env :
6
+ cwd : ${{github.workspace}}
7
+
8
+ concurrency :
9
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-ci
10
+ cancel-in-progress : true
11
+
5
12
jobs :
13
+ checkout-submodules :
14
+ runs-on : ubuntu-24.04
15
+
16
+ steps :
17
+ - uses : actions/checkout@v5
18
+ with :
19
+ submodules : recursive
20
+
21
+ - id : create-cache-key
22
+ run : echo "submodule-cache-key=$(git submodule | head -n 1)" >> $GITHUB_OUTPUT
23
+ shell : bash
24
+
25
+ - uses : actions/cache/restore@v4
26
+ id : submodules-cache-restore
27
+ with :
28
+ key : submodule-${{ steps.create-cache-key.outputs.submodule-cache-key }}
29
+ path : ${{github.workspace}}/packages/ethereum-tests
30
+
31
+ - if : steps.submodules-cache-restore.outputs.cache-hit != 'true'
32
+ uses : actions/cache/save@v4
33
+ id : submodule-cache-save
34
+ with :
35
+ path : ${{github.workspace}}/packages/ethereum-tests
36
+ key : submodule-${{ steps.create-cache-key.outputs.submodule-cache-key}}
37
+
38
+ outputs :
39
+ submodule-cache-key : submodule-${{ steps.create-cache-key.outputs.submodule-cache-key}}
40
+
6
41
build :
42
+ needs : checkout-submodules
7
43
runs-on : ubuntu-24.04
8
44
steps :
9
45
- uses : actions/checkout@v5
46
+ with :
47
+ submodules : recursive
10
48
11
49
- name : Install pnpm
12
50
uses : pnpm/action-setup@v4
21
59
22
60
- run : pnpm -v && command -v pnpm
23
61
62
+ - name : Restore ethereum-tests submodule
63
+ uses : actions/cache/restore@v4
64
+ with :
65
+ path : ${{github.workspace}}/packages/ethereum-tests
66
+ key : ${{ needs.checkout-submodules.outputs.submodule-cache-key }}
67
+
24
68
- name : Install deps
25
69
run : pnpm install --frozen-lockfile
26
70
32
76
33
77
- name : Test
34
78
run : pnpm test
79
+
80
+ outputs :
81
+ dep-cache-key : pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}
0 commit comments