Skip to content

chore(tests): add Playwright configuration and initial tests #6

chore(tests): add Playwright configuration and initial tests

chore(tests): add Playwright configuration and initial tests #6

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-logs:
timeout-minutes: 10
runs-on: ubuntu-latest
env:
SECRET_MONGODB_CONNECTION_STRING: ${{ secrets.SECRET_MONGODB_CONNECTION_STRING }}
PUBLIC_YOUR_DOMAIN: ${{ secrets.PUBLIC_YOUR_DOMAIN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Cache node modules and Playwright browsers
id: cache-node-modules-and-playwright-browsers
uses: actions/cache@v4
with:
path: dependencies
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules-and-playwright-browsers.outputs.cache-hit != 'true'
run: npm ci
- name: Install Playwright browsers
if: steps.cache-node-modules-and-playwright-browsers.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium
- name: Test Playwright API
run: npx playwright test --project="Google Chrome"
- name: Upload Playwright Report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 7