Skip to content

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

chore(tests): add Playwright configuration and initial tests

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

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
steps:
- uses: actions/checkout@v4
- name: Cache Node Modules
id: realgolfgames-logs-cache-node-modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-${{ env.cache-name }}-
${{ runner.os }}-node-modules-
${{ runner.os }}-
- name: Cache Playwright dependencies
id: realgolfgames-logs-cache-playwright
uses: actions/cache@v4
env:
cache-name: cache-playwright
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-deps-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.json') }}
restore-keys: |
${{ runner.os }}-playwright-deps-${{ env.cache-name }}-
${{ runner.os }}-playwright-deps-
${{ runner.os }}-
- name: Install dependencies
if: steps.realgolfgames-logs-cache-node-modules.outputs.cache-hit != 'true'
run: npm install
- name: Install Playwright dependencies
if: steps.realgolfgames-logs-cache-playwright.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium
- name: Run tests
run: npx playwright test --project="Google Chrome"