-
Notifications
You must be signed in to change notification settings - Fork 18
161 lines (157 loc) · 4.6 KB
/
ci.yml
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: CI
on:
push:
branches:
- main
tags:
- v[0-9]+.[0-9]+.[0-9]+*
pull_request:
env:
TURBO_TELEMETRY_DISABLED: 1
jobs:
build:
name: Build & Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
node-version: [20.x]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache pnpm modules
uses: actions/cache@v4
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- uses: pnpm/action-setup@v4
with:
run_install: false
- name: Set pnpm store path
run: |
pnpm config set store-dir ~/.pnpm-store --global
- name: Install Dependencies
run: |
pnpm install
shell: bash
- name: Run Tests
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
# Run tasks in serial on Ubuntu to avoid Xvfb issues
pnpm run ci-linux
else
pnpm run ci
fi
shell: bash
- name: 🐛 Show logs
if: failure()
run: |
pnpm run ci:e2e:logs
- name: 🐛 Debug Build
uses: stateful/[email protected]
if: failure()
with:
timeout: '180000'
build-macos-universal:
name: MacOS Universal Build & Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest]
node-version: [20.x]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache pnpm modules
uses: actions/cache@v4
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- uses: pnpm/action-setup@v4
with:
run_install: false
- name: Set pnpm store path
run: |
pnpm config set store-dir ~/.pnpm-store --global
- name: Install Dependencies
run: |
pnpm install
shell: bash
- name: Run Tests
run: |
pnpm run build
pnpm run ci-mac:e2e:mac-universal
shell: bash
- name: 🐛 Show logs
if: failure()
run: |
pnpm run ci:e2e:logs
- name: 🐛 Debug Build
uses: stateful/[email protected]
if: failure()
with:
timeout: '180000'
build-windows:
name: Windows Build & Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
test: ['units', 'e2e:no-binary', 'e2e:builder-cjs', 'e2e:builder-esm', 'e2e:forge-cjs', 'e2e:forge-esm']
node-version: [20.x]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache pnpm modules
uses: actions/cache@v4
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- uses: pnpm/action-setup@v4
with:
run_install: false
- name: Set pnpm store path
run: |
pnpm config set store-dir ~/.pnpm-store --global
- name: Install Dependencies
run: |
pnpm install
shell: bash
- name: Run Tests
run: |
pnpm run build
pnpm run ci-windows:${{ matrix.test }}
shell: bash
- name: 🐛 Show logs
if: failure()
run: |
pnpm run ci:e2e:logs
- name: 🐛 Debug Build
uses: stateful/[email protected]
if: failure()
with:
timeout: '180000'