.github/workflows/playwright.yml (view raw)
1name: Playwright Tests
2on:
3 push:
4 branches: [ main, master ]
5 pull_request:
6 branches: [ main, master ]
7jobs:
8 test:
9 timeout-minutes: 60
10 runs-on: ubuntu-latest
11 services:
12 strapi:
13 image: octree/caroster
14 ports:
15 - 1337:1337
16 env:
17 NODE_ENV: test
18 steps:
19 - uses: actions/checkout@v3
20 - uses: actions/setup-node@v3
21 with:
22 node-version: 18
23 - name: Install dependencies
24 run: yarn
25 working-directory: frontend
26 - name: Install Playwright Browsers
27 run: yarn playwright install --with-deps
28 working-directory: frontend
29 - name: Wait for Strapi to be ready
30 uses: jakejarvis/wait-action@master
31 with:
32 time: '30s'
33 - name: Run Playwright tests
34 run: yarn playwright test
35 working-directory: frontend
36 - uses: actions/upload-artifact@v3
37 if: always()
38 with:
39 name: playwright-report
40 path: frontend/playwright-report/
41 retention-days: 30