Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
on: pull_request
on:
pull_request:
paths:
- "assets/admin/**"
- "assets/shared/**"

name: Test

Expand Down Expand Up @@ -36,7 +40,7 @@ jobs:
CI: "true"
run: |
docker compose run --rm playwright npx playwright install --with-deps
docker compose run --rm playwright npx playwright test
docker compose run --rm playwright npx playwright test admin

- uses: actions/upload-artifact@v4
if: always()
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/playwright_client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
pull_request:
paths:
- "assets/client/**"
- "assets/shared/**"

name: Test

env:
COMPOSE_USER: runner

jobs:
frontend-build-and-test:
name: Playwright
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup network
run: docker network create frontend

- name: Composer install
run: |
docker compose run --rm phpfpm composer install

- name: Copy fixture assets to public/fixtures
run: |
docker compose run --rm phpfpm cp -r fixtures/public/fixtures public/fixtures

- name: Build assets
run: |
docker compose run --rm node npm install
docker compose run --rm node npm run build

- name: Run playwright
env:
CI: "true"
run: |
docker compose run --rm playwright npx playwright install --with-deps
docker compose run --rm playwright npx playwright test client

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
50 changes: 50 additions & 0 deletions .github/workflows/playwright_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
pull_request:
paths:
- "assets/template/**"
- "assets/shared/**"

name: Test

env:
COMPOSE_USER: runner

jobs:
frontend-build-and-test:
name: Playwright
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup network
run: docker network create frontend

- name: Composer install
run: |
docker compose run --rm phpfpm composer install

- name: Copy fixture assets to public/fixtures
run: |
docker compose run --rm phpfpm cp -r fixtures/public/fixtures public/fixtures

- name: Build assets
run: |
docker compose run --rm node npm install
docker compose run --rm node npm run build

- name: Run playwright
env:
CI: "true"
run: |
docker compose run --rm playwright npx playwright install --with-deps
docker compose run --rm playwright npx playwright test template

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
Loading