chore(tests): add Playwright configuration and initial tests #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Node Modules | |
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" |