Files
nimbus/.github/workflows/e2e-tests.yml
Mazen Touati e3b3370ebe feat(relay): render dd() responses properly (#29)
* feat(relay): render `dd()` responses correctly

* wiki(relay): `dd` responses

* test: fix failing test after changing test id

* style: apply TS style fixes

* style: apply php style fixes

* chore: fix types

* build: always run php and js test on PR changes

* test(relay): simplify test

* build: use proper cache key for e2e job

* feat(relay): more assertive dd parser

* build: fix package.json indentation

* build: properly build for `dev` mode

* test: correctly install current branch artifacts for E2E

* test: fail fast for PW tests

* build: don't run php and js tests twice on PRs

* test: PW fixes

* test: correctly build artifacts from branch for E2E

* chore: fix naming

* fix(relay): properly parse some type of closures in `dd`

* test: enable parallel runs for PW

* test(relay): simplify `dd` E2E test
2026-01-04 15:57:57 +01:00

75 lines
2.0 KiB
YAML

name: run-e2e-tests
on:
push:
branches: [ base ]
pull_request:
branches: [ base ]
jobs:
test:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout code
if: ${{ !env.ACT }}
uses: actions/checkout@v4
- name: Determine branch for E2E setup
id: branch
env:
EVENT_NAME: ${{ github.event_name }}
PR_HEAD: ${{ github.event.pull_request.head.ref }}
run: |
if [ "$EVENT_NAME" = "pull_request" ]; then
echo "branch_name=$PR_HEAD" >> $GITHUB_OUTPUT
else
echo "branch_name=base" >> $GITHUB_OUTPUT
fi
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
- name: Install JS dependencies
run: npm ci
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: curl, mbstring, pcntl, intl, fileinfo, sodium
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: vendor
key: composer-cache-${{ steps.branch.outputs.branch_name }}
restore-keys: |
composer-8.2-L12
composer-8.2
- name: Cache Playwright browsers
uses: actions/cache@v3
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-${{ runner.os }}-v1
restore-keys: |
playwright-browsers-${{ runner.os }}-
- name: Install Playwright Browsers
run: npx playwright install
- name: Setup E2E test repo
run: bash tests/E2E/setup.sh "${{ steps.branch.outputs.branch_name }}"
- name: Run Playwright tests
run: bash tests/E2E/launch.sh & (sleep 5 && npm run test:e2e)
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30