@@ -53,131 +53,106 @@ jobs:
53
53
steps :
54
54
- uses : actions/checkout@v4
55
55
56
+ - name : Get changed files
57
+ id : changed-files
58
+ uses : tj-actions/changed-files@ea251d4d2f03a9c18841ae1b752f58b82dfb4d5e # v35.3.0
59
+ with :
60
+ files : |
61
+ docs/**
62
+ .github/**
63
+ !.github/workflows/ci.yml
64
+ **.md
65
+
56
66
- uses : ./.github/actions/setup-and-cache
67
+ if : steps.changed-files.outputs.only_changed != 'true'
57
68
with :
58
69
node-version : ${{ matrix.node_version }}
59
70
60
71
- uses : browser-actions/setup-chrome@v1
72
+ if : steps.changed-files.outputs.only_changed != 'true'
61
73
62
74
- name : Install
75
+ if : steps.changed-files.outputs.only_changed != 'true'
63
76
run : pnpm i
64
77
65
78
- name : Install Playwright Dependencies
66
- run : pnpm exec playwright install --with-deps
79
+ if : steps.changed-files.outputs.only_changed != 'true'
80
+ run : pnpm exec playwright install chromium --with-deps
67
81
68
82
- name : Build
83
+ if : steps.changed-files.outputs.only_changed != 'true'
69
84
run : pnpm run build
70
85
71
86
- name : Test
87
+ if : steps.changed-files.outputs.only_changed != 'true'
72
88
run : pnpm run test:ci
73
89
74
90
- name : Test Examples
91
+ if : steps.changed-files.outputs.only_changed != 'true'
75
92
run : pnpm run test:examples
76
93
77
- test-ui :
78
- strategy :
79
- matrix :
80
- os : [ubuntu-latest, macos-14, windows-latest]
81
- fail-fast : false
82
-
83
- runs-on : ${{ matrix.os }}
84
-
85
- timeout-minutes : 30
86
-
87
- steps :
88
- - uses : actions/checkout@v4
89
-
90
- - uses : ./.github/actions/setup-and-cache
91
- with :
92
- node-version : 20
93
-
94
- - name : Install
95
- run : pnpm i
96
-
97
- - name : Install Playwright Dependencies
98
- run : pnpm exec playwright install chromium
99
-
100
- - name : Build
101
- run : pnpm run build
102
-
103
94
- name : Unit Test UI
95
+ if : steps.changed-files.outputs.only_changed != 'true'
104
96
run : pnpm run -C packages/ui test:ui
105
97
106
- - name : E2E Test UI
107
- run : pnpm -C test/ui test-e2e
108
-
109
98
test-browser :
110
- runs-on : ubuntu-latest
99
+ runs-on : ${{ matrix.os }}
111
100
strategy :
112
101
matrix :
113
- browser : [[chrome, chromium], [firefox, firefox], [edge, webkit]]
102
+ os :
103
+ - macos-14
104
+ - windows-latest
105
+ browser :
106
+ - [chromium, chrome]
107
+ - [firefox, firefox]
108
+ - [webkit]
114
109
fail-fast : false
115
110
116
111
timeout-minutes : 30
117
112
118
113
steps :
119
114
- uses : actions/checkout@v4
120
115
116
+ - name : Get changed files
117
+ id : changed-files
118
+ uses : tj-actions/changed-files@ea251d4d2f03a9c18841ae1b752f58b82dfb4d5e # v35.3.0
119
+ with :
120
+ files : |
121
+ docs/**
122
+ .github/**
123
+ !.github/workflows/ci.yml
124
+ **.md
125
+
121
126
- uses : ./.github/actions/setup-and-cache
127
+ if : steps.changed-files.outputs.only_changed != 'true'
122
128
with :
123
129
node-version : 20
124
130
125
131
- uses : browser-actions/setup-chrome@v1
132
+ if : ${{ steps.changed-files.outputs.only_changed != 'true' && matrix.browser[0] == 'chromium' }}
126
133
- uses : browser-actions/setup-firefox@v1
134
+ if : ${{ steps.changed-files.outputs.only_changed != 'true' && matrix.browser[0] == 'firefox' }}
127
135
128
136
- name : Install
137
+ if : steps.changed-files.outputs.only_changed != 'true'
129
138
run : pnpm i
130
139
131
140
- name : Install Playwright Dependencies
132
- run : pnpm exec playwright install --with-deps
141
+ if : steps.changed-files.outputs.only_changed != 'true'
142
+ run : pnpm exec playwright install ${{ matrix.browser[0] }} --with-deps
133
143
134
144
- name : Build
145
+ if : steps.changed-files.outputs.only_changed != 'true'
135
146
run : pnpm run build
136
147
137
- - name : Test Browser (webdriverio)
138
- run : pnpm run test:browser:webdriverio
139
- env :
140
- BROWSER : ${{ matrix.browser[0] }}
141
-
142
148
- name : Test Browser (playwright)
149
+ if : steps.changed-files.outputs.only_changed != 'true'
143
150
run : pnpm run test:browser:playwright
144
151
env :
145
- BROWSER : ${{ matrix.browser[1] }}
146
-
147
- test-browser-windows :
148
- runs-on : windows-latest
149
- strategy :
150
- matrix :
151
- browser : [[chrome, chromium], [edge, webkit]]
152
- fail-fast : false
153
-
154
- timeout-minutes : 30
155
-
156
- steps :
157
- - uses : actions/checkout@v4
158
-
159
- - uses : ./.github/actions/setup-and-cache
160
- with :
161
- node-version : 20
162
-
163
- - uses : browser-actions/setup-chrome@v1
164
- - uses : browser-actions/setup-edge@v1
165
-
166
- - name : Install
167
- run : pnpm i
168
-
169
- - name : Install Playwright Dependencies
170
- run : pnpm exec playwright install --with-deps
171
-
172
- - name : Build
173
- run : pnpm run build
152
+ BROWSER : ${{ matrix.browser[0] }}
174
153
175
154
- name : Test Browser (webdriverio)
176
155
run : pnpm run test:browser:webdriverio
177
- env :
178
- BROWSER : ${{ matrix.browser[0] }}
179
-
180
- - name : Test Browser (playwright)
181
- run : pnpm run test:browser:playwright
156
+ if : ${{ steps.changed-files.outputs.only_changed != 'true' && matrix.browser[1] }}
182
157
env :
183
158
BROWSER : ${{ matrix.browser[1] }}
0 commit comments