-
Notifications
You must be signed in to change notification settings - Fork 19
63 lines (52 loc) · 1.55 KB
/
Copy pathci.yml
File metadata and controls
63 lines (52 loc) · 1.55 KB
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
54
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
# 1 ▸ code
- uses: actions/checkout@v4
# 2 ▸ pnpm
- uses: pnpm/action-setup@v3
with:
version: 10.12.1
run_install: false
# 3 ▸ Node + pnpm-store cache
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
# 4 ▸ deps
- name: Install dependencies
run: pnpm install --frozen-lockfile
# 5 ▸ **cache Playwright browsers**
- name: Cache Playwright browsers
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright # default download dir
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-playwright-
# 6 ▸ download browsers if cache miss
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps
# 7 ▸ lint
- run: pnpm lint
name: Lint
# 8 ▸ pack, inject tarball, run tests
- run: pnpm run prepack:core
name: Pack core tarball
- run: node scripts/install-local-tarball.js
name: Inject tarball into fixtures
- run: pnpm test
name: Run tests
# 9 ▸ traces on failure
- name: Upload Playwright traces on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-traces
path: packages/core/__tests__/test-results/