@@ -90,14 +90,15 @@ jobs:
9090 - uses : actions/download-artifact@v3
9191 with :
9292 name : build-artifacts
93- - name : Unzip artifacts (Linux, macOS)
94- if : runner.os != 'Windows'
95- run : unzip -o compressed-build.zip
96- - name : Unzip artifacts (Windows)
97- if : runner.os == 'Windows'
98- run : 7z x compressed-build.zip -aoa -o${{ github.workspace }}
99- - name : Print directory structure
100- run : ls -R
93+ - name : Unzip artifacts
94+ shell : bash
95+ run : |
96+ if [ "$RUNNER_OS" == "Windows" ]; then
97+ pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
98+ else
99+ unzip -o compressed-build.zip
100+ fi
101+ ls -R
101102 - name : Unit test coverage
102103 run : |
103104 yarn test-unit-coverage --forbid-only
@@ -131,14 +132,15 @@ jobs:
131132 - uses : actions/download-artifact@v3
132133 with :
133134 name : build-artifacts
134- - name : Unzip artifacts (Linux, macOS)
135- if : runner.os != 'Windows'
136- run : unzip -o compressed-build.zip
137- - name : Unzip artifacts (Windows)
138- if : runner.os == 'Windows'
139- run : 7z x compressed-build.zip -aoa -o${{ github.workspace }}
140- - name : Print directory structure
141- run : ls -R
135+ - name : Unzip artifacts
136+ shell : bash
137+ run : |
138+ if [ "$RUNNER_OS" == "Windows" ]; then
139+ pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
140+ else
141+ unzip -o compressed-build.zip
142+ fi
143+ ls -R
142144 - name : Unit tests
143145 run : yarn test-unit --forbid-only
144146
@@ -164,14 +166,15 @@ jobs:
164166 - uses : actions/download-artifact@v3
165167 with :
166168 name : build-artifacts
167- - name : Unzip artifacts (Linux, macOS)
168- if : runner.os != 'Windows'
169- run : unzip -o compressed-build.zip
170- - name : Unzip artifacts (Windows)
171- if : runner.os == 'Windows'
172- run : 7z x compressed-build.zip -aoa -o${{ github.workspace }}
173- - name : Print directory structure
174- run : ls -R
169+ - name : Unzip artifacts
170+ shell : bash
171+ run : |
172+ if [ "$RUNNER_OS" == "Windows" ]; then
173+ pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
174+ else
175+ unzip -o compressed-build.zip
176+ fi
177+ ls -R
175178 - name : Unit tests
176179 run : yarn test-unit --forbid-only
177180
@@ -204,17 +207,61 @@ jobs:
204207 - uses : actions/download-artifact@v3
205208 with :
206209 name : build-artifacts
207- - name : Unzip artifacts (Linux, macOS)
208- if : runner.os != 'Windows'
209- run : unzip -o compressed-build.zip
210- - name : Unzip artifacts (Windows)
211- if : runner.os == 'Windows'
212- run : 7z x compressed-build.zip -aoa -o${{ github.workspace }}
213- - name : Print directory structure
214- run : ls -R
210+ - name : Unzip artifacts
211+ shell : bash
212+ run : |
213+ if [ "$RUNNER_OS" == "Windows" ]; then
214+ pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
215+ else
216+ unzip -o compressed-build.zip
217+ fi
218+ ls -R
215219 - name : Integration tests (${{ matrix.browser }})
216220 run : yarn test-api-${{ matrix.browser }} --headless --forbid-only
217221
222+ test-playwright-parallel :
223+ timeout-minutes : 20
224+ strategy :
225+ matrix :
226+ node-version : [18] # just one as integration tests are about testing in browser
227+ runs-on : [ubuntu] # macos is flaky
228+ browser : [chromium, firefox, webkit]
229+ runs-on : ${{ matrix.runs-on }}-latest
230+ steps :
231+ - uses : actions/checkout@v3
232+ - name : Use Node.js ${{ matrix.node-version }}.x
233+ uses : actions/setup-node@v3
234+ with :
235+ node-version : ${{ matrix.node-version }}.x
236+ cache : ' yarn'
237+ - name : Install dependencies
238+ run : |
239+ yarn --frozen-lockfile
240+ yarn install-addons
241+ - name : Install playwright
242+ run : npx playwright install --with-deps ${{ matrix.browser }}
243+ - name : Wait for build job
244+ uses : NathanFirmo/wait-for-other-job@v1.1.1
245+ with :
246+ token : ${{ secrets.GITHUB_TOKEN }}
247+ job : build
248+ - uses : actions/download-artifact@v3
249+ with :
250+ name : build-artifacts
251+ - name : Unzip artifacts
252+ shell : bash
253+ run : |
254+ if [ "$RUNNER_OS" == "Windows" ]; then
255+ pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
256+ else
257+ unzip -o compressed-build.zip
258+ fi
259+ ls -R
260+ - name : Build demo
261+ run : yarn build-demo
262+ - name : Integration tests
263+ run : yarn test-playwright-${{ matrix.browser }} --forbid-only
264+
218265 test-api :
219266 needs : build
220267 timeout-minutes : 20
@@ -240,13 +287,14 @@ jobs:
240287 - uses : actions/download-artifact@v3
241288 with :
242289 name : build-artifacts
243- - name : Unzip artifacts (Linux, macOS)
244- if : runner.os != 'Windows'
245- run : unzip -o compressed-build.zip
246- - name : Unzip artifacts (Windows)
247- if : runner.os == 'Windows'
248- run : 7z x compressed-build.zip -aoa -o${{ github.workspace }}
249- - name : Print directory structure
250- run : ls -R
290+ - name : Unzip artifacts
291+ shell : bash
292+ run : |
293+ if [ "$RUNNER_OS" == "Windows" ]; then
294+ pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
295+ else
296+ unzip -o compressed-build.zip
297+ fi
298+ ls -R
251299 - name : Integration tests (${{ matrix.browser }})
252300 run : yarn test-api-${{ matrix.browser }} --headless --forbid-only
0 commit comments