-
-
Notifications
You must be signed in to change notification settings - Fork 272
114 lines (95 loc) · 2.93 KB
/
Copy pathtest.yml
File metadata and controls
114 lines (95 loc) · 2.93 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
114
name: Test
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
permissions: {}
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
permissions:
contents: read
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
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@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.18.0
package-manager-cache: false
- name: Install Pnpm
if: steps.changes.outputs.changed == 'true'
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
run_install: true
- name: Build
if: steps.changes.outputs.changed == 'true'
run: node --run build
- name: Unit Test
if: steps.changes.outputs.changed == 'true'
run: node --run test
# ======== e2e ========
e2e:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
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@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.18.0
package-manager-cache: false
- name: Install Pnpm
if: steps.changes.outputs.changed == 'true'
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
run_install: true
- name: Build
if: steps.changes.outputs.changed == 'true'
run: node --run build
- name: Run E2E tests
if: steps.changes.outputs.changed == 'true'
run: node --run e2e