Skip to content

Commit 2ce5300

Browse files
committed
Update playwright.yml
1 parent a7ba311 commit 2ce5300

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

.github/workflows/playwright.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
name: Playwright Tests
2-
on:
3-
push:
4-
branches: [ "async-requests" ]
5-
pull_request:
6-
branches: [ "async-requests" ]
2+
on: [push, pull_request]
73
jobs:
84
test:
9-
timeout-minutes: 60
10-
runs-on: ubuntu-latest
5+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
6+
timeout-minutes: 15
7+
runs-on: ubuntu-20.04
118
strategy:
129
matrix:
1310
adapter: ['vue3']
@@ -16,15 +13,24 @@ jobs:
1613

1714
- uses: actions/setup-node@v4
1815
with:
19-
node-version: lts/*
16+
node-version: 21.7.3
2017

2118
- name: Build Inertia
2219
run: |
2320
rm package-lock.json
2421
npm install
25-
cd packages/core && npm run build
26-
cd ../${{ matrix.adapter }} && npm run build
27-
cd tests && npm install
22+
cd packages/core
23+
npm run build
24+
25+
- name: Build Adapter
26+
run: |
27+
cd packages/${{ matrix.adapter }}
28+
npm run build
29+
30+
- name: Install Test Dependencies
31+
run: |
32+
cd packages/${{ matrix.adapter }}/test-app
33+
npm install
2834
2935
- name: Local-link @inertiajs/core
3036
run: cd packages/core && npm link
@@ -35,8 +41,11 @@ jobs:
3541
- name: Install Playwright Browsers
3642
run: cd packages/${{ matrix.adapter }} && npx playwright install --with-deps
3743

44+
- name: Install Playwright Test Dependencies
45+
run: cd tests/app && npm install
46+
3847
- name: Run Playwright Tests
39-
run: cd packages/${{ matrix.adapter }} && npx playwright test
48+
run: cd tests && PACKAGE=${{ matrix.adapter }} npx playwright test
4049

4150
- uses: actions/upload-artifact@v4
4251
if: ${{ !cancelled() }}

0 commit comments

Comments
 (0)