feat: add Playwright testing framework configuration and tests #71

Merged
jank merged 48 commits from feature/add-playwright into main 2025-01-17 13:34:52 +00:00
Showing only changes of commit 0cecd1cd2b - Show all commits

View file

@ -1,24 +1,51 @@
name: Playwright Tests name: Playwright Tests
on: on:
push: push:
branches: [ main, master ] branches: [ main, master ]
pull_request: pull_request:
branches: [ main, master ] branches: [ main, master ]
jobs: jobs:
test: test:
timeout-minutes: 60 timeout-minutes: 60
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Checkout the repository
- uses: actions/checkout@v4 - uses: actions/checkout@v4
# Set up Node.js
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: lts/* node-version: lts/*
# Install project dependencies
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
# Build the Angular project
- name: Build Angular Project
run: npm run build
# Start Angular development server
- name: Start Angular Development Server
run: npm start
env:
PORT: 4200 # Ensures the server runs on a predictable port
continue-on-error: true
# Install Playwright and dependencies
- name: Install Playwright Browsers - name: Install Playwright Browsers
run: npx playwright install --with-deps run: npx playwright install --with-deps
- name: Run Playwright tests
# Run Playwright tests
- name: Run Playwright Tests
run: npx playwright test run: npx playwright test
env:
CI: true # Ensures Playwright runs in CI mode
# Upload Playwright report
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
with: with: