-
Notifications
You must be signed in to change notification settings - Fork 95
310 lines (292 loc) · 10.8 KB
/
Copy pathmain.yml
File metadata and controls
310 lines (292 loc) · 10.8 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
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
name: Run tests
on:
push:
branches:
- 'main'
- 'main-*'
- 'release/**'
pull_request:
workflow_dispatch:
env:
DOTVVM_ROOT: ${{ github.workspace }}
DOTNET_NOLOGO: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build-published:
name: Build published projects without warnings
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
configuration: [Release, Debug]
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Set up
uses: ./.github/setup
with:
sln: src/DotVVM.Crossplatform.slnf
# no reason to Spam with warnings when normal build fails
- name: Build Framework (without /WarnAsError)
run: dotnet build src/Framework/Framework --configuration ${{ matrix.configuration }} --no-restore --no-incremental /property:WarningLevel=0
# framework
- name: Core
run: dotnet build src/Framework/Framework --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
- name: Framework
run: dotnet build src/Framework/Framework --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
- name: Testing
run: dotnet build src/Framework/Testing --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
# hosting
- name: Hosting.AspNetCore
run: dotnet build src/Framework/Hosting.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
# command-line
- name: CommandLine
run: dotnet build src/Tools/CommandLine --configuration ${{ matrix.configuration }} --no-restore --framework net8.0 /WarnAsError
# swashbuckle
- name: Api.Swashbuckle.AspNetCore
run: dotnet build src/Api/Swashbuckle.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
# hot reload
- name: HotReload.Common
run: dotnet build src/Tools/HotReload/Common --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
- name: HotReload.AspNetCore
run: dotnet build src/Tools/HotReload/AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
# application insights
- name: Tracing.ApplicationInsights
run: dotnet build src/Tracing/ApplicationInsights --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
- name: Tracing.ApplicationInsights.AspNetCore
run: dotnet build src/Tracing/ApplicationInsights.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
# miniprofiler
- name: Tracing.MiniProfiler.AspNetCore
run: dotnet build src/Tracing/MiniProfiler.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
# dynamic data
- name: DynamicData
run: dotnet build src/DynamicData/DynamicData --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
build-all:
name: Build all projects without errors
runs-on: windows-2022
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Set up
uses: ./.github/setup
- name: MSBuild build
run: msbuild src/DotVVM.sln -v:m -t:Clean,Build -p:Configuration=Release -p:WarningLevel=0
dotnet-unit-tests:
name: .NET unit tests
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false # don't kill tests when one environment fails
matrix:
os: [ubuntu-latest, windows-2022, macOS-latest]
steps:
- uses: actions/checkout@v3
- name: Set up
uses: ./.github/setup
with:
sln: src/DotVVM.Crossplatform.slnf
- name: Tests (net472)
uses: ./.github/unittest
if: ${{ (matrix.os == 'windows-2022') && (success() || failure()) }}
with:
project: src/Tests
name: framework-tests
title: Framework Tests
github-token: ${{ secrets.GITHUB_TOKEN }}
target-framework: net472
- name: Adapters.WebForms.Tests (net472)
uses: ./.github/unittest
if: matrix.os == 'windows-2022'
with:
project: src/Adapters/Tests/WebForms
name: webforms-adapters-tests
title: WebForms Adapter Tests
github-token: ${{ secrets.GITHUB_TOKEN }}
target-framework: net472
# IMPORTANT: net8.0 tests must run AFTER all net472 tests on Windows.
# Building net472 projects requires the NuGet Core targets files to reference all TFMs.
# Running net472 steps first avoids potential state corruption.
- name: Tests (net8.0)
uses: ./.github/unittest
if: ${{ success() || failure() }}
with:
project: src/Tests
name: framework-tests
title: Framework Tests
github-token: ${{ secrets.GITHUB_TOKEN }}
target-framework: net8.0
# - name: Tests (net7.0)
# uses: ./.github/unittest
# with:
# project: src/Tests
# name: framework-tests
# title: Framework Tests
# github-token: ${{ secrets.GITHUB_TOKEN }}
# target-framework: net7.0
- name: Analyzers.Tests (net8.0)
uses: ./.github/unittest
if: ${{ success() || failure() }}
with:
project: src/Analyzers/Analyzers.Tests
name: analyzers-tests
title: Analyzer Tests
github-token: ${{ secrets.GITHUB_TOKEN }}
target-framework: net8.0
# - name: Analyzers.Tests (net7.0)
# uses: ./.github/unittest
# with:
# project: src/Analyzers/Analyzers.Tests
# name: analyzers-tests
# title: Analyzer Tests
# github-token: ${{ secrets.GITHUB_TOKEN }}
# target-framework: net7.0
- name: Integration Tests (net10.0)
uses: ./.github/unittest
if: ${{ matrix.os == 'ubuntu-latest' && (success() || failure()) }}
with:
project: src/IntegrationTests
name: integration-tests
title: Integration Tests
github-token: ${{ secrets.GITHUB_TOKEN }}
target-framework: net10.0
commandline-tests:
name: CommandLine tests
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-2022, macOS-latest]
steps:
- uses: actions/checkout@v3
- name: Set up
uses: ./.github/setup
with:
sln: src/DotVVM.Crossplatform.slnf
- name: Build Compiler
run: dotnet build
src/Tools/Compiler/DotVVM.Compiler.csproj
--no-restore
--configuration Debug
-p:WarningLevel=0
shell: bash
- name: Build CommandLine
run: dotnet build
src/Tools/CommandLine/DotVVM.CommandLine.csproj
--framework net8.0
--no-restore
--configuration Debug
-p:WarningLevel=0
shell: bash
- name: Build CommandLine (Release)
run: dotnet build
src/Tools/CommandLine/DotVVM.CommandLine.csproj
--framework net8.0
--no-restore
--configuration Release
-p:WarningLevel=0
shell: bash
- name: Build CommandLine.Tests
run: dotnet build
src/Tools/Tests/CommandLine/DotVVM.CommandLine.Tests.csproj
--framework net8.0
--no-restore
--configuration Debug
-p:WarningLevel=0
shell: bash
- name: Run CommandLine.Tests (Debug)
run: dotnet test
src/Tools/Tests/CommandLine/DotVVM.CommandLine.Tests.csproj
--framework net8.0
--no-restore
--logger "GitHubActions;report-warnings=true"
--logger "trx;LogFileName=${{ github.workspace }}/artifacts/test/unit-test-results-commandline-tests-net8.0-Debug.trx"
--configuration Debug
-p:WarningLevel=0
shell: bash
- name: Run CommandLine.Tests (Release)
run: dotnet test
src/Tools/Tests/CommandLine/DotVVM.CommandLine.Tests.csproj
--framework net8.0
--no-restore
--logger "GitHubActions;report-warnings=true"
--logger "trx;LogFileName=${{ github.workspace }}/artifacts/test/unit-test-results-commandline-tests-net8.0-Release.trx"
--configuration Release
-p:WarningLevel=0
shell: bash
js-tests:
runs-on: ubuntu-latest
name: JS unit tests
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
# Node.js
- uses: actions/setup-node@v2
with:
node-version: 24
- run: |
corepack enable
yarn set version stable
shell: bash
- name: yarn install
run: yarn install --immutable
working-directory: src/Framework/Framework/
- name: TypeScript check
run: yarn tsc-check
working-directory: src/Framework/Framework/
- name: yarn jest
run: yarn jest --ci --reporters=default --reporters=jest-github-actions-reporter
working-directory: src/Framework/Framework/
ui-tests:
name: UI tests
runs-on: ${{ matrix.os }}
timeout-minutes: 50
strategy:
fail-fast: false # don't kill tests when one environment fails
matrix:
# specify only one config, all other configurations are included explicitly
browser: [chrome]
os: [ubuntu-latest]
environment: [Production]
samples-config: [Default]
path-base: [""]
include:
- browser: chrome
os: windows-2022
environment: Development
samples-config: Default
- browser: firefox
os: ubuntu-latest
environment: Development
samples-config: Default
path-base: /test-basepath
- browser: firefox
os: ubuntu-latest
environment: Production
samples-config: Default
- browser: firefox
os: ubuntu-latest
environment: Development
samples-config: ExperimentalFeaturesTests
- browser: chrome
os: ubuntu-latest
environment: Production
samples-config: ExperimentalFeaturesTests
env:
SLN: "${{ matrix.os == 'windows-2022' && 'src/DotVVM.sln' || 'src/DotVVM.Crossplatform.slnf' }}"
steps:
- uses: actions/checkout@v3
- name: Set up
uses: ./.github/setup
with:
sln: ${{ env.SLN }}
- name: Run UI tests
uses: ./.github/uitest
with:
browser: ${{ matrix.browser }}
github-token: ${{ secrets.GITHUB_TOKEN }}
build-configuration: "${{ matrix.environment == 'Production' && 'Release' || 'Debug' }}"
runtime-environment: "${{ matrix.environment }}"
samples-config: "${{ matrix.samples-config }}"
path-base: "${{ matrix.path-base }}"