99 - ' release/**'
1010 pull_request :
1111 types : [opened, synchronize]
12-
12+
1313env :
1414 E2E_ARTIFACT : e2e-run-${{ github.run_id }}-${{ github.run_number }}
1515
@@ -43,16 +43,16 @@ jobs:
4343 with :
4444 node-version-file : ' .nvmrc'
4545 cache : ' pnpm'
46-
46+
4747 - name : Setup PHP, with Composer and Extensions
4848 uses : shivammathur/setup-php@v2
4949 with :
5050 tools : composer:v2
5151 php-version : ' 8.0'
52-
52+
5353 - name : Setup Problem Matchers for PHP
5454 run : echo "::add-matcher::${{ runner.tool_cache }}/php.json"
55-
55+
5656 - name : Get Cache Files Directory
5757 id : composer-cache
5858 working-directory : plugins/wme-sitebuilder
7474 key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
7575 restore-keys : |
7676 ${{ runner.os }}-composer-
77-
77+
7878 # Install playwright's binary under custom directory to cache
7979 - name : Set Playwright path (non-windows)
8080 if : runner.os != 'Windows'
@@ -117,7 +117,7 @@ jobs:
117117 with :
118118 node-version-file : ' .nvmrc'
119119 cache : ' pnpm'
120-
120+
121121 - name : Setup PHP, with Composer and Extensions
122122 uses : shivammathur/setup-php@v2
123123 with :
@@ -142,7 +142,7 @@ jobs:
142142 key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
143143 restore-keys : |
144144 ${{ runner.os }}-composer-
145-
145+
146146 # Install playwright's binary under custom directory to cache
147147 - name : Set Playwright path (non-windows)
148148 if : runner.os != 'Windows'
@@ -167,7 +167,7 @@ jobs:
167167
168168 - name : Lint
169169 run : pnpm lint
170-
170+
171171 e2e-tests :
172172 name : End-to-End Testing (via Playwright)
173173 runs-on : ubuntu-latest
@@ -193,13 +193,13 @@ jobs:
193193 with :
194194 node-version-file : ' .nvmrc'
195195 cache : ' pnpm'
196-
196+
197197 - name : Setup PHP, with Composer and Extensions
198198 uses : shivammathur/setup-php@v2
199199 with :
200200 tools : composer:v2
201201 php-version : ' 8.0'
202-
202+
203203 - name : Setup Problem Matchers for PHP
204204 run : echo "::add-matcher::${{ runner.tool_cache }}/php.json"
205205
@@ -218,7 +218,7 @@ jobs:
218218 key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
219219 restore-keys : |
220220 ${{ runner.os }}-composer-
221-
221+
222222 # Install playwright's binary under custom directory to cache
223223 - name : Set Playwright path (non-windows)
224224 if : runner.os != 'Windows'
@@ -241,9 +241,13 @@ jobs:
241241 - name : Build
242242 run : pnpm build
243243
244+ - name : Get installed Playwright version
245+ run : |
246+ echo "playwright_version=$(pnpm list -r --parseable | grep -m 1 playwright+test | cut -d "@" -f3)" >> $GITHUB_ENV
247+
244248 - name : Install Playwright Dependencies
245249 run : |
246- npx playwright install chromium --with-deps
250+ npx playwright@${{ env.playwright_version }} install chromium --with-deps
247251
248252 - name : Launch wp-env End-to-End Environment
249253 working-directory : plugins/wme-sitebuilder
@@ -272,7 +276,7 @@ jobs:
272276
273277 deploy :
274278 if : ${{ github.ref_name == 'main' || github.ref_name == '1.0-branch' || github.ref_name == '2.0-branch' }}
275- name : Deploy to Test Sites
279+ name : Deploy to Test Sites
276280 needs : [build, lint, e2e-tests]
277281 uses : ./.github/workflows/deploy.yml
278282 secrets :
0 commit comments