Skip to content

Merge pull request #1516 from opencast/dependabot/npm_and_yarn/vitest… #3015

Merge pull request #1516 from opencast/dependabot/npm_and_yarn/vitest…

Merge pull request #1516 from opencast/dependabot/npm_and_yarn/vitest… #3015

name: Playwright UI-Test
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Install Node Dependency
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Install supported browsers
run: npx playwright install
- name: Prepare configuration
run: >
sed -i
's_https://develop.opencast.org_http://localhost:5173_'
public/editor-settings.toml
- name: Prepare mock files
run: cp -r .github/mock/editor public/
- name: Build editor
run: |
npm run build
cp public/editor-settings.toml build/
- name: Use production build for testing
run: sed -i 's/npm run start/python -m http.server --bind 127.0.0.1 --directory build 5173/' playwright.config.ts
- name: Run playwright-test
run: npx playwright test --config=playwright.config.ts
- name: Upload tests results
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: test-results
path: test-results/