js-waku/.github/workflows/playwright.yml
Sasha 281d9b2c9d
feat: add playwright CI testing (#1542)
* add tests-browser package

* rename to browser

* add playwright and experiment with karma

* add lock

* remove karma

* remove readme

* replace default app, rename

* add and configure playwright

* up package-lock

* use @waku/create-app, add scripts to handle it

* remove tsconfig

* update playwright script

* move dependency to root

* set folder

* up

* try install step

* add playwright dep

* remove step

* add es module utils

* fix import issue

* run on master

* use image prop

* use dotenv-flow, set .env.local

* add log, use dotenv-flow

* add env var to ci

* add env vars to CI

* return install of deps

* return container & log build step

* upgrade @waku/create-app

* fix firefox in container problem
2023-09-22 14:34:16 +02:00

41 lines
929 B
YAML

name: Playwright tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
NODE_JS: "18"
EXAMPLE_TEMPLATE: "web-chat"
EXAMPLE_NAME: "example"
EXAMPLE_PORT: "8080"
# Firefox in container fails due to $HOME not being owned by user running commands
# more details https://github.com/microsoft/playwright/issues/6500
HOME: "/root"
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.38.0-jammy
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_JS }}
- uses: ./.github/actions/npm
- name: Run Playwright tests
run: npm run test --workspace=@waku/browser-tests
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30