44 branches : [ master ]
55jobs :
66 test :
7- timeout-minutes : 60
7+ timeout-minutes : 30
88 runs-on : ubuntu-latest
99 steps :
10- - uses : actions/checkout@v5
11- - uses : actions/setup-node@v5
12- with :
13- node-version : ' 24'
14- - name : Install dependencies
15- run : npm ci
16- - name : Install Playwright Browsers
17- run : npx playwright install --with-deps
18- - name : Run Playwright tests
19- run : npm run test:e2e
20- - uses : actions/upload-artifact@v4
21- if : ${{ !cancelled() }}
22- with :
23- name : playwright-report
24- path : playwright-report/
25- retention-days : 30
10+ - uses : actions/checkout@v5
11+ - uses : actions/setup-node@v5
12+ with :
13+ node-version : " 24"
14+ cache : " npm"
15+ - name : Install dependencies
16+ run : npm ci
17+ - name : Cache Playwright browsers
18+ id : playwright-cache
19+ uses : actions/cache@v4
20+ with :
21+ path : ~/.cache/ms-playwright
22+ key : playwright-chromium-${{ hashFiles('package-lock.json') }}
23+ - name : Install Playwright Browsers
24+ if : steps.playwright-cache.outputs.cache-hit != 'true'
25+ run : npx playwright install --with-deps chromium
26+ - name : Install Playwright system deps
27+ if : steps.playwright-cache.outputs.cache-hit == 'true'
28+ run : npx playwright install-deps chromium
29+ - name : Cache build output
30+ id : dist-cache
31+ uses : actions/cache@v4
32+ with :
33+ path : dist/
34+ key : dist-${{ hashFiles('src/**', 'public/**', 'vite.config.ts',
35+ ' tsconfig.json' , 'package-lock.json') }}
36+ - name : Build app
37+ if : steps.dist-cache.outputs.cache-hit != 'true'
38+ run : npm run build
39+ - name : Run Playwright tests
40+ run : npm run test:e2e
41+ env :
42+ SKIP_BUILD : " 1"
43+ - uses : actions/upload-artifact@v4
44+ if : ${{ !cancelled() }}
45+ with :
46+ name : playwright-report
47+ path : playwright-report/
48+ retention-days : 30
0 commit comments