1
- name : Test (Ubuntu)
1
+ name : Test
2
2
3
3
# Controls when the action will run.
4
4
on :
@@ -47,13 +47,17 @@ jobs:
47
47
- "!**/dictionary.txt"
48
48
49
49
# ======== ut ========
50
- ut-ubuntu :
51
- runs-on : ubuntu-latest
50
+ ut :
51
+ runs-on : ${{ matrix.os }}
52
52
needs : changes
53
53
if : ${{ needs.changes.outputs.changed == 'true' }}
54
54
strategy :
55
55
matrix :
56
+ os : [ubuntu-latest]
56
57
node-version : [18, 20, 22]
58
+ include :
59
+ - node-version : 18
60
+ os : windows-latest
57
61
58
62
# Steps represent a sequence of tasks that will be executed as part of the job
59
63
steps :
62
66
with :
63
67
fetch-depth : 10
64
68
69
+ - name : Git config
70
+ if : ${{ matrix.os == 'windows-latest' }}
71
+ shell : bash
72
+ run : |
73
+ git config --system core.longpaths true
74
+
65
75
- name : Install Pnpm
66
76
run : corepack enable
67
77
@@ -78,16 +88,26 @@ jobs:
78
88
run : pnpm run test:unit
79
89
80
90
# ======== integration && e2e ========
81
- integration-e2e-ubuntu :
82
- runs-on : ubuntu-latest
91
+ integration-e2e :
92
+ runs-on : ${{ matrix.os }}
83
93
needs : changes
84
94
if : ${{ needs.changes.outputs.changed == 'true' }}
85
95
strategy :
86
96
matrix :
97
+ os : [ubuntu-latest]
87
98
node-version : [18, 20, 22]
99
+ include :
100
+ - node-version : 18
101
+ os : windows-latest
88
102
89
103
# Steps represent a sequence of tasks that will be executed as part of the job
90
104
steps :
105
+ - name : Git config
106
+ if : ${{ matrix.os == 'windows-latest' }}
107
+ shell : bash
108
+ run : |
109
+ git config --system core.longpaths true
110
+
91
111
- name : Checkout
92
112
uses : actions/checkout@v4
93
113
with :
@@ -103,7 +123,7 @@ jobs:
103
123
cache : ' pnpm'
104
124
105
125
- name : Install Dependencies
106
- run : pnpm install && cd ./tests && npx playwright install
126
+ run : pnpm install && cd ./tests && pnpx playwright install chromium
107
127
108
128
- name : Integration Test (Vitest)
109
129
run : pnpm run test:integration
@@ -112,11 +132,11 @@ jobs:
112
132
run : pnpm run test:e2e
113
133
114
134
# ======== benchmark ========
115
- benchmark-ubuntu :
135
+ benchmark :
116
136
# Only Ubuntu 20.04 and 22.04 are supported at the moment.
117
137
# See https://github.com/CodSpeedHQ/action/blob/016456b513677f9d4a1c509c7f8a38d8dd55b2b0/.github/workflows/ci.yml#L19.
118
138
runs-on : ubuntu-22.04
119
- needs : [integration-e2e-ubuntu ]
139
+ needs : [integration-e2e]
120
140
strategy :
121
141
matrix :
122
142
node-version : [20]
@@ -151,8 +171,8 @@ jobs:
151
171
# ======== exit ========
152
172
pr-check-required :
153
173
if : (!cancelled() && !failure())
154
- needs : [ut-ubuntu , integration-e2e-ubuntu , benchmark-ubuntu ]
174
+ needs : [ut, integration-e2e, benchmark]
155
175
runs-on : ubuntu-latest
156
- name : Test passed or skipped (Ubuntu)
176
+ name : Test passed or skipped
157
177
steps :
158
- - run : echo "All tests passed or skipped (Ubuntu) ."
178
+ - run : echo "All tests passed or skipped."
0 commit comments