File tree Expand file tree Collapse file tree 1 file changed +27
-10
lines changed
Expand file tree Collapse file tree 1 file changed +27
-10
lines changed Original file line number Diff line number Diff line change @@ -49,21 +49,38 @@ jobs:
4949 # build-name: BUILD_INFO
5050 # project-name: REPO_NAME
5151
52- # - name: 'BrowserStackLocal Setup'
53- # uses: 'browserstack/github-actions/[email protected] ' 54- # with:
55- # local-testing: start
56- # local-identifier: random
5752 - name : Run Playwright tests
5853 run : |
5954 cd playwright
6055 yarn test:ci
6156
62- # - name: 'BrowserStackLocal Setup'
63- # uses: 'browserstack/github-actions/[email protected] ' 64- # with:
65- # local-testing: stop
66- # local-identifier: $BROWSERSTACK_LOCAL_IDENTIFIER
57+ SRC=browserstack.yml
58+ TMP=.tmp-browserstack.yml
59+
60+ count=$(yq eval '.platforms | length' "$SRC")
61+ if [ "$count" -eq 0 ]; then
62+ echo "No platforms found in $SRC"
63+ exit 1
64+ fi
65+
66+ mv $SRC $TMP
67+
68+ for i in $(seq 0 $((count - 1))); do
69+ echo "=== Running platform #$((i+1))/$count ==="
70+ # produce a temp config that contains only the i-th platform and a shared build identifier
71+ yq eval \
72+ '.platforms = [ .platforms['"$i"'] ] |
73+ "$TMP" > "$SRC"
74+
75+ # Run the BrowserStack runner for that single-platform config.
76+ yarn test:ci
77+
78+ # If you control test worker concurrency via Playwright instead:
79+ # cd playwright
80+ # yarn test:ci --workers=1
81+
82+ echo "=== Finished platform #$((i+1)) ==="
83+ done
6784
6885 - uses : actions/upload-artifact@v4
6986 if : ${{ !cancelled() }}
You can’t perform that action at this time.
0 commit comments