Skip to content

More e2e tests

More e2e tests #56

name: Playwright Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Run Playwright Tests
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v4
# Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
# Install dependencies
- name: Install dependencies
run: yarn install
# Install Playwright browsers
- name: Install Playwright browsers
run: yarn playwright install chromium --with-deps
# Build the application
- name: Build application
run: yarn build
# Run Playwright tests
- name: Run Playwright tests
run: yarn test:e2e
# Upload test results
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- name: Comment PR with Report Link
if: github.event_name == 'pull_request'
uses: thollander/actions-comment-pull-request@v2
with:
message: |
✅ Playwright tests completed.
📄 [Download HTML report](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}