File tree Expand file tree Collapse file tree 3 files changed +46
-26
lines changed Expand file tree Collapse file tree 3 files changed +46
-26
lines changed Original file line number Diff line number Diff line change 83
83
echo "Working tree dirty at end of job"
84
84
exit 1
85
85
fi
86
-
87
- compatibility-test :
88
- name : Compatibility test
89
- needs : prepare
90
- runs-on : ubuntu-latest
91
- strategy :
92
- matrix :
93
- node-version : [18.x, 20.x, 22.x]
94
- steps :
95
- - name : Checkout and setup environment
96
- uses : MetaMask/action-checkout-and-setup@v1
97
- with :
98
- is-high-risk-environment : false
99
- node-version : ${{ matrix.node-version }}
100
- - name : Install dependencies via Yarn
101
- run : rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn
102
- - run : yarn test
103
- - name : Restore lockfile
104
- run : git restore yarn.lock
105
- - name : Require clean working directory
106
- shell : bash
107
- run : |
108
- if ! git diff --exit-code; then
109
- echo "Working tree dirty at end of job"
110
- exit 1
111
- fi
Original file line number Diff line number Diff line change
1
+ name : Compatibility Test
2
+
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ enabled :
7
+ required : false
8
+ type : boolean
9
+ default : true
10
+
11
+ jobs :
12
+ enabled-check :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Skipping compatibility test
16
+ if : inputs.enabled != true
17
+ run : echo "Skipping compatibility test"
18
+
19
+ compatibility-test :
20
+ needs : enabled-check
21
+ if : inputs.enabled == true
22
+ runs-on : ubuntu-latest
23
+ strategy :
24
+ matrix :
25
+ node-version : [18.x, 20.x, 22.x]
26
+ steps :
27
+ - uses : MetaMask/action-checkout-and-setup@v1
28
+ with :
29
+ is-high-risk-environment : false
30
+ node-version : ${{ matrix.node-version }}
31
+ - run : rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn
32
+ - run : yarn test
33
+ - run : git restore yarn.lock
34
+ - shell : bash
35
+ run : |
36
+ if ! git diff --exit-code; then
37
+ echo "Working tree dirty at end of job"
38
+ exit 1
39
+ fi
Original file line number Diff line number Diff line change @@ -38,13 +38,20 @@ jobs:
38
38
name : Build, lint, and test
39
39
uses : ./.github/workflows/build-lint-test.yml
40
40
41
+ compatibility-test :
42
+ name : Compatibility test
43
+ uses : ./.github/workflows/compatibility-test.yml
44
+ with :
45
+ enabled : ${{ github.ref == 'refs/heads/main' }}
46
+
41
47
all-jobs-completed :
42
48
name : All jobs completed
43
49
runs-on : ubuntu-latest
44
50
needs :
45
51
- check-workflows
46
52
- analyse-code
47
53
- build-lint-test
54
+ - compatibility-test
48
55
outputs :
49
56
PASSED : ${{ steps.set-output.outputs.PASSED }}
50
57
steps :
You can’t perform that action at this time.
0 commit comments