-
Notifications
You must be signed in to change notification settings - Fork 97
160 lines (143 loc) · 5.65 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
name: Github Actions
on: ["push"]
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@v2
- 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 netcoreapp3.1 /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@v2
- 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@v2
- name: Set up
uses: ./.github/setup
with:
sln: src/DotVVM.Crossplatform.slnf
- name: Tests
uses: ./.github/unittest
with:
project: src/Tests
name: framework-tests
title: Framework Tests
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Analyzers.Tests
uses: ./.github/unittest
with:
project: src/Analyzers/Analyzers.Tests
name: analyzers-tests
title: Analyzer Tests
github-token: ${{ secrets.GITHUB_TOKEN }}
js-tests:
runs-on: ubuntu-latest
name: JS unit tests
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
# 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:
browser: [firefox, chrome]
os: [windows-2022, ubuntu-latest]
exclude:
- browser: firefox
os: windows-2022
env:
SLN: "${{ matrix.os == 'windows-2022' && 'src/DotVVM.sln' || 'src/DotVVM.Crossplatform.slnf' }}"
steps:
- uses: actions/checkout@v2
- 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 }}