Skip to content

Commit a74e571

Browse files
committed
build and ci before e2e
1 parent 15b9b78 commit a74e571

File tree

1 file changed

+42
-18
lines changed

1 file changed

+42
-18
lines changed

.github/workflows/playwright.yml

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,51 @@
11
name: Playwright Tests
22
on:
33
push:
4-
branches: [ main, master ]
4+
branches: [main]
55
pull_request:
6-
branches: [ main, master ]
6+
branches: [main]
77
jobs:
88
test:
99
timeout-minutes: 60
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v4
14-
with:
15-
node-version: lts/*
16-
- name: Install dependencies
17-
run: npm ci
18-
- name: Install Playwright Browsers
19-
run: npx playwright install --with-deps
20-
- name: Run Playwright tests
21-
run: npx playwright test
22-
- uses: actions/upload-artifact@v4
23-
if: always()
24-
with:
25-
name: playwright-report
26-
path: playwright-report/
27-
retention-days: 30
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: lts/*
16+
- name: Install dependencies
17+
run: npm ci
18+
19+
- name: Cache node modules
20+
id: cache-npm
21+
uses: actions/cache@v3
22+
env:
23+
cache-name: cache-node-modules
24+
with:
25+
# npm cache files are stored in `~/.npm` on Linux/macOS
26+
path: ~/.npm
27+
key: ${{ hashFiles('**/package-lock.json') }}
28+
29+
- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }}
30+
name: List the state of node modules
31+
continue-on-error: true
32+
run: npm list
33+
34+
- name: Install
35+
run: npm install
36+
37+
- name: CI
38+
run: npm run ci
39+
env:
40+
CI: true
41+
42+
- name: Install Playwright Browsers
43+
run: npx playwright install --with-deps
44+
- name: Run Playwright tests
45+
run: npx playwright test
46+
- uses: actions/upload-artifact@v4
47+
if: always()
48+
with:
49+
name: playwright-report
50+
path: playwright-report/
51+
retention-days: 30

0 commit comments

Comments
 (0)