-
Notifications
You must be signed in to change notification settings - Fork 18
110 lines (90 loc) · 3.14 KB
/
compat.yml
File metadata and controls
110 lines (90 loc) · 3.14 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Compatibility
on:
schedule:
- cron: "0 14 * * 1"
workflow_dispatch:
inputs:
next_version:
description: Next.js version or dist-tag
required: false
default: latest
react_version:
description: React and react-dom version or dist-tag
required: false
default: latest
react_dom_version:
description: Optional react-dom override
required: false
default: ""
types_react_version:
description: Optional @types/react override
required: false
default: latest
types_react_dom_version:
description: Optional @types/react-dom override
required: false
default: latest
permissions:
contents: read
concurrency:
group: compatibility-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
latest-stack:
name: Latest React / Next Stack
runs-on: ubuntu-latest
timeout-minutes: 30
env:
NEXT_VERSION: ${{ github.event.inputs.next_version || 'latest' }}
REACT_VERSION: ${{ github.event.inputs.react_version || 'latest' }}
REACT_DOM_VERSION: ${{ github.event.inputs.react_dom_version || '' }}
TYPES_REACT_VERSION: ${{ github.event.inputs.types_react_version || 'latest' }}
TYPES_REACT_DOM_VERSION: ${{ github.event.inputs.types_react_dom_version || 'latest' }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 10.12.1
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install workspace dependencies
run: pnpm install --frozen-lockfile
- name: Cache Playwright browsers
id: pw-cache
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('packages/core/package.json') }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Install Playwright browsers (if cache miss)
if: steps.pw-cache.outputs.cache-hit != 'true'
run: pnpm --filter @react-zero-ui/core exec playwright install --with-deps
- name: Rewrite fixture versions
run: node scripts/set-compat-fixture-versions.mjs
- name: Lint
run: pnpm lint
- name: Run Build
run: pnpm build
- name: Run Prepack
run: pnpm prepack:core
- name: Install packed core into fixtures
run: |
TARBALL="$(pwd)/$(ls -t dist/*.tgz | head -n1)"
pnpm --dir packages/core/__tests__/fixtures/next add "$TARBALL"
pnpm --dir packages/core/__tests__/fixtures/next install --no-frozen-lockfile
pnpm --dir packages/core/__tests__/fixtures/vite add "$TARBALL"
pnpm --dir packages/core/__tests__/fixtures/vite install --no-frozen-lockfile
- name: Run Vite tests
run: pnpm test:vite
- name: Run Next.js tests
run: pnpm test:next
- name: Run unit tests
run: pnpm test:unit
- name: Run CLI tests
run: pnpm test:cli
- name: Run integration tests
run: pnpm test:integration