-
-
Notifications
You must be signed in to change notification settings - Fork 257
113 lines (93 loc) · 2.84 KB
/
test.yml
File metadata and controls
113 lines (93 loc) · 2.84 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
111
112
113
name: Test
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
env:
# Configure Node.js memory limit to 6GB (default GitHub Actions limit is 7GB)
NODE_OPTIONS: --max-old-space-size=6144
jobs:
# ======== ut ========
ut:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
# run ut on macOS, as SWC cases will fail on Ubuntu CI
os: [macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Install Pnpm
run: |
npm install -g corepack@latest --force
corepack enable
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: changes
with:
predicate-quantifier: 'every'
filters: |
changed:
- "!**/*.md"
- "!**/*.mdx"
- "!**/_meta.json"
- "!**/dictionary.txt"
- name: Setup Node.js
if: steps.changes.outputs.changed == 'true'
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
package-manager-cache: false
- name: Install Dependencies
if: steps.changes.outputs.changed == 'true'
run: pnpm install
- name: Unit Test
if: steps.changes.outputs.changed == 'true'
run: node --run test
# ======== e2e ========
e2e:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Install Pnpm
run: |
npm install -g corepack@latest --force
corepack enable
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: changes
with:
predicate-quantifier: 'every'
filters: |
changed:
- "!**/*.md"
- "!**/*.mdx"
- "!**/_meta.json"
- "!**/dictionary.txt"
- name: Setup Node.js
if: steps.changes.outputs.changed == 'true'
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
package-manager-cache: false
- name: Install Dependencies
if: steps.changes.outputs.changed == 'true'
run: pnpm install
- name: Run E2E tests
if: steps.changes.outputs.changed == 'true'
run: node --run e2e
- name: Run E2E type checker
if: steps.changes.outputs.changed == 'true'
run: cd e2e && node --run type-check