-
Notifications
You must be signed in to change notification settings - Fork 97
226 lines (209 loc) · 7.88 KB
/
main.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
214
215
216
217
218
219
220
221
222
223
224
225
226
name: Run tests
on:
push:
branches:
- '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 net6.0 /WarnAsError
- name: Framework
run: dotnet build src/Framework/Framework --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
- name: Testing
run: dotnet build src/Framework/Testing --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
# hosting
- name: Hosting.AspNetCore
run: dotnet build src/Framework/Hosting.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
# command-line
- name: CommandLine
run: dotnet build src/Tools/CommandLine --configuration ${{ matrix.configuration }} --no-restore --framework net6.0 /WarnAsError
# swashbuckle
- name: Api.Swashbuckle.AspNetCore
run: dotnet build src/Api/Swashbuckle.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
# hot reload
- name: HotReload.Common
run: dotnet build src/Tools/HotReload/Common --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
- name: HotReload.AspNetCore
run: dotnet build src/Tools/HotReload/AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
# application insights
- name: Tracing.ApplicationInsights
run: dotnet build src/Tracing/ApplicationInsights --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
- name: Tracing.ApplicationInsights.AspNetCore
run: dotnet build src/Tracing/ApplicationInsights.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
# miniprofiler
- name: Tracing.MiniProfiler.AspNetCore
run: dotnet build src/Tracing/MiniProfiler.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
# dynamic data
- name: DynamicData
run: dotnet build src/DynamicData/DynamicData --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.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 (net8.0)
uses: ./.github/unittest
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: Tests (net472)
uses: ./.github/unittest
if: matrix.os == 'windows-2022'
with:
project: src/Tests
name: framework-tests
title: Framework Tests
github-token: ${{ secrets.GITHUB_TOKEN }}
target-framework: net472
- name: Analyzers.Tests (net6.0)
uses: ./.github/unittest
with:
project: src/Analyzers/Analyzers.Tests
name: analyzers-tests
title: Analyzer Tests
github-token: ${{ secrets.GITHUB_TOKEN }}
target-framework: net6.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: 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
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: 16
- 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]
include:
- browser: chrome
os: windows-2022
environment: Development
samples-config: Default
- browser: firefox
os: ubuntu-latest
environment: Development
samples-config: Default
- 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 }}"