-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.57 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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"