Skip to content

Commit ce7c847

Browse files
committed
5317: replace playwright workflow with three playwright workflows (one for each asset directory)
1 parent af121bf commit ce7c847

File tree

3 files changed

+106
-2
lines changed

3 files changed

+106
-2
lines changed

.github/workflows/playwright.yaml renamed to .github/workflows/playwright_admin.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
on: pull_request
1+
on:
2+
pull_request:
3+
paths:
4+
- "assets/admin/**"
5+
- "assets/shared/**"
26

37
name: Test
48

@@ -36,7 +40,7 @@ jobs:
3640
CI: "true"
3741
run: |
3842
docker compose run --rm playwright npx playwright install --with-deps
39-
docker compose run --rm playwright npx playwright test
43+
docker compose run --rm playwright npx playwright test template
4044
4145
- uses: actions/upload-artifact@v4
4246
if: always()
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
on:
2+
pull_request:
3+
paths:
4+
- "assets/client/**"
5+
- "assets/shared/**"
6+
7+
name: Test
8+
9+
env:
10+
COMPOSE_USER: runner
11+
12+
jobs:
13+
frontend-build-and-test:
14+
name: Playwright
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: true
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup network
23+
run: docker network create frontend
24+
25+
- name: Composer install
26+
run: |
27+
docker compose run --rm phpfpm composer install
28+
29+
- name: Copy fixture assets to public/fixtures
30+
run: |
31+
docker compose run --rm phpfpm cp -r fixtures/public/fixtures public/fixtures
32+
33+
- name: Build assets
34+
run: |
35+
docker compose run --rm node npm install
36+
docker compose run --rm node npm run build
37+
38+
- name: Run playwright
39+
env:
40+
CI: "true"
41+
run: |
42+
docker compose run --rm playwright npx playwright install --with-deps
43+
docker compose run --rm playwright npx playwright test template
44+
45+
- uses: actions/upload-artifact@v4
46+
if: always()
47+
with:
48+
name: playwright-report
49+
path: playwright-report/
50+
retention-days: 30
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
on:
2+
pull_request:
3+
paths:
4+
- "assets/template/**"
5+
- "assets/shared/**"
6+
7+
name: Test
8+
9+
env:
10+
COMPOSE_USER: runner
11+
12+
jobs:
13+
frontend-build-and-test:
14+
name: Playwright
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: true
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup network
23+
run: docker network create frontend
24+
25+
- name: Composer install
26+
run: |
27+
docker compose run --rm phpfpm composer install
28+
29+
- name: Copy fixture assets to public/fixtures
30+
run: |
31+
docker compose run --rm phpfpm cp -r fixtures/public/fixtures public/fixtures
32+
33+
- name: Build assets
34+
run: |
35+
docker compose run --rm node npm install
36+
docker compose run --rm node npm run build
37+
38+
- name: Run playwright
39+
env:
40+
CI: "true"
41+
run: |
42+
docker compose run --rm playwright npx playwright install --with-deps
43+
docker compose run --rm playwright npx playwright test template
44+
45+
- uses: actions/upload-artifact@v4
46+
if: always()
47+
with:
48+
name: playwright-report
49+
path: playwright-report/
50+
retention-days: 30

0 commit comments

Comments
 (0)