-
Notifications
You must be signed in to change notification settings - Fork 192
214 lines (175 loc) · 7.05 KB
/
env-checker-ci-schedule.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
name: Environment Checker Integration Test Schedule Run
on:
schedule:
# Runs everyday 15:42 China Time. Avoid start of hour because these are high load times.
- cron: '42 7 * * *'
workflow_dispatch: # Manual trigger
jobs:
func:
name: Build and Test OS "${{ matrix.os }}", Node.js "${{ matrix.node-version }}", Azure Functions Core Tools "${{ matrix.func-version }}"
strategy:
## Only test basic cases on PR trigger, because the `cb() never called` issue happens too often, blocking our PRs.
## Our original test matrix is quite big, and every case will run `npm install` once, so it is more likely for us to encounter this issue.
## Cut the number of test cases to minimize impact.
##
## Details about this issue: https://github.com/npm/cli/wiki/%22cb()-never-called%3F--I'm-having-the-same-problem!%22
### tl;dr: This error is not one thing, but a category of errors. It means "something broke and we didn't have a way to catch it". We will always need a lot of detail to reproduce an error like this, or we cannot ever fix it. Every instance is unique, and your cb() never called is nothing like any other.
# macos-latest is 10.15. We need to test 11 as well.
matrix:
os: [windows-latest, macos-latest, macos-11, ubuntu-latest]
node-version: [16, 18, 20]
func-version: [none, "3", "4", "4.0.4670", "~4.0.5174"]
max-parallel: 30
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# Use node 18 to setup project
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 18
- uses: pnpm/action-setup@v4
# https://github.com/marketplace/actions/retry-step
- name: Setup project with Retry
uses: nick-invision/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
retry_wait_seconds: 10
on_retry_command: git clean -fXd .
command: |
npx lerna exec -- rm -rf node_modules
npm run setup --legacy-peer-deps
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: Setup Azure Functions Core Tools For Linux
if: ${{ runner.os == 'Linux' && matrix.func-version != 'none' }}
run: |
sudo npm install --unsafe-perm -g azure-functions-core-tools@${{ matrix.func-version }}
- name: Setup Azure Functions Core Tools For Windows and macOS
if: ${{ runner.os != 'Linux' && matrix.func-version != 'none' }}
run: |
npm install -g azure-functions-core-tools@${{ matrix.func-version }}
## In headless Linux CI machines xvfb is required to run VS Code
## https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions
- name: Integration Test with xvfb
working-directory: ./packages/fx-core
if: runner.os == 'Linux'
run: |
xvfb-run -a npm run test:func-checker
- name: Integration Test
working-directory: ./packages/fx-core
if: runner.os != 'Linux'
run: |
npm run test:func-checker
node:
name: Build and Test OS "${{ matrix.os }}", Node.js "${{ matrix.node-version }}"
strategy:
matrix: # TODO: add more versions and cases where Node.js do not exist
os: [windows-latest, macos-latest, macos-11, ubuntu-latest]
node-version: [16, 18]
max-parallel: 30
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# Use node 18 to setup project
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 18
- uses: pnpm/action-setup@v4
# https://github.com/marketplace/actions/retry-step
- name: Setup project with Retry
uses: nick-invision/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
retry_wait_seconds: 10
on_retry_command: git clean -fXd .
command: |
npx lerna exec -- rm -rf node_modules
npm run setup --legacy-peer-deps
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
## In headless Linux CI machines xvfb is required to run VS Code
## https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions
- name: Integration Test with xvfb
working-directory: ./packages/fx-core
if: runner.os == 'Linux'
run: |
xvfb-run -a npm run test:node-checker
- name: Integration Test
working-directory: ./packages/fx-core
if: runner.os != 'Linux'
run: |
npm run test:node-checker
dotnet:
name: Build and Test OS "${{ matrix.os }}", .NET SDK "${{ matrix.dotnet-version }}"
strategy:
matrix:
os: [windows-latest, macos-latest, macos-13, macos-12, ubuntu-latest]
dotnet-version: [none, 3.1.x, 5.0.x, 6.0.x]
exclude:
- os: macos-latest
dotnet-version: 3.1.x
- os: macos-latest
dotnet-version: 5.0.x
max-parallel: 30
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Uninstalling .NET on Windows
if: ${{ runner.os == 'Windows' }}
run: |
powershell -NoProfile -Command ./.github/env-checker/uninstall-dotnet.ps1
- name: Uninstalling .NET on macOS or Ubuntu
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
run: |
./.github/env-checker/uninstall-dotnet.sh
- name: Setup .NET SDK
if: ${{ matrix.dotnet-version != 'none' }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
# Use node 18 to setup project
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 18
- uses: pnpm/action-setup@v4
# https://github.com/marketplace/actions/retry-step
- name: Setup project with Retry
uses: nick-invision/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
retry_wait_seconds: 10
on_retry_command: git clean -fXd .
command: |
npx lerna exec -- rm -rf node_modules
npm run setup --legacy-peer-deps
## In headless Linux CI machines xvfb is required to run VS Code
## https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions
- name: Integration Test with xvfb
working-directory: ./packages/fx-core
if: runner.os == 'Linux'
run: |
xvfb-run -a npm run test:dotnet-checker
- name: Integration Test
working-directory: ./packages/fx-core
if: runner.os != 'Linux'
run: |
npm run test:dotnet-checker