-
Notifications
You must be signed in to change notification settings - Fork 798
157 lines (150 loc) · 8.75 KB
/
healthchecks_ui_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
name: HealthChecks UI CI
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- src/HealthChecks.UI/**
- src/HealthChecks.UI.*/**
- test/HealthChecks.UI.*/**
- test/_SHARED/**
- samples/HealthChecks.UI*/**
- .github/workflows/healthchecks_ui_ci.yml
- Directory.Build.props
- Directory.Build.targets
- build/docker-images/HealthChecks.UI.Image/**
tags-ignore:
- release-*
- preview-*
pull_request:
branches: [ master ]
paths:
- src/HealthChecks.UI/**
- src/HealthChecks.UI.*/**
- test/HealthChecks.UI.*/**
- test/_SHARED/**
- samples/HealthChecks.UI*/**
- .github/workflows/healthchecks_ui_ci.yml
- Directory.Build.props
- Directory.Build.targets
- build/docker-images/HealthChecks.UI.Image/**
jobs:
build:
runs-on: ubuntu-latest
services:
sqlserver:
image: mcr.microsoft.com/mssql/server
ports:
- 5433:1433
env:
ACCEPT_EULA: Y
SA_PASSWORD: Password12!
npgsql:
image: postgres
ports:
- 8010:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: Password12!
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: Password12!
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Restore
run: |
dotnet restore ./src/HealthChecks.UI/HealthChecks.UI.csproj &&
dotnet restore ./test/HealthChecks.UI.Tests/HealthChecks.UI.Tests.csproj &&
dotnet restore ./src/HealthChecks.UI.Client/HealthChecks.UI.Client.csproj &&
dotnet restore ./test/HealthChecks.UI.Client.Tests/HealthChecks.UI.Client.Tests.csproj &&
dotnet restore ./src/HealthChecks.UI.Core/HealthChecks.UI.Core.csproj &&
dotnet restore ./test/HealthChecks.UI.Core.Tests/HealthChecks.UI.Core.Tests.csproj &&
dotnet restore ./src/HealthChecks.UI.Data/HealthChecks.UI.Data.csproj &&
dotnet restore ./test/HealthChecks.UI.Data.Tests/HealthChecks.UI.Data.Tests.csproj &&
dotnet restore ./src/HealthChecks.UI.InMemory.Storage/HealthChecks.UI.InMemory.Storage.csproj &&
dotnet restore ./src/HealthChecks.UI.MySql.Storage/HealthChecks.UI.MySql.Storage.csproj &&
dotnet restore ./src/HealthChecks.UI.PostgreSQL.Storage/HealthChecks.UI.PostgreSQL.Storage.csproj &&
dotnet restore ./src/HealthChecks.UI.SQLite.Storage/HealthChecks.UI.SQLite.Storage.csproj &&
dotnet restore ./src/HealthChecks.UI.SqlServer.Storage/HealthChecks.UI.SqlServer.Storage.csproj &&
dotnet restore ./src/HealthChecks.UI.K8s.Operator/HealthChecks.UI.K8s.Operator.csproj
- name: Check formatting
run: |
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI/HealthChecks.UI.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.UI.Tests/HealthChecks.UI.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.Client/HealthChecks.UI.Client.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.UI.Client.Tests/HealthChecks.UI.Client.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.Core/HealthChecks.UI.Core.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.UI.Core.Tests/HealthChecks.UI.Core.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.Data/HealthChecks.UI.Data.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.UI.Data.Tests/HealthChecks.UI.Data.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.InMemory.Storage/HealthChecks.UI.InMemory.Storage.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.MySql.Storage/HealthChecks.UI.MySql.Storage.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.PostgreSQL.Storage/HealthChecks.UI.PostgreSQL.Storage.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.SQLite.Storage/HealthChecks.UI.SQLite.Storage.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.SqlServer.Storage/HealthChecks.UI.SqlServer.Storage.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.K8s.Operator/HealthChecks.UI.K8s.Operator.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1)
- name: Build
run: |
dotnet build --no-restore ./src/HealthChecks.UI/HealthChecks.UI.csproj &&
dotnet build --no-restore ./test/HealthChecks.UI.Tests/HealthChecks.UI.Tests.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.Client/HealthChecks.UI.Client.csproj &&
dotnet build --no-restore ./test/HealthChecks.UI.Client.Tests/HealthChecks.UI.Client.Tests.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.Core/HealthChecks.UI.Core.csproj &&
dotnet build --no-restore ./test/HealthChecks.UI.Core.Tests/HealthChecks.UI.Core.Tests.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.Data/HealthChecks.UI.Data.csproj &&
dotnet build --no-restore ./test/HealthChecks.UI.Data.Tests/HealthChecks.UI.Data.Tests.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.InMemory.Storage/HealthChecks.UI.InMemory.Storage.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.MySql.Storage/HealthChecks.UI.MySql.Storage.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.PostgreSQL.Storage/HealthChecks.UI.PostgreSQL.Storage.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.SQLite.Storage/HealthChecks.UI.SQLite.Storage.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.SqlServer.Storage/HealthChecks.UI.SqlServer.Storage.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.K8s.Operator/HealthChecks.UI.K8s.Operator.csproj
- name: Test
run: >
dotnet test
./test/HealthChecks.UI.Tests/HealthChecks.UI.Tests.csproj
--no-restore
--no-build
--collect "XPlat Code Coverage"
--results-directory .coverage
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover &&
dotnet test
./test/HealthChecks.UI.Client.Tests/HealthChecks.UI.Client.Tests.csproj
--no-restore
--no-build
--collect "XPlat Code Coverage"
--results-directory .coverage
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover &&
dotnet test
./test/HealthChecks.UI.Core.Tests/HealthChecks.UI.Core.Tests.csproj
--no-restore
--no-build
--collect "XPlat Code Coverage"
--results-directory .coverage
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
dotnet test
./test/HealthChecks.UI.Data.Tests/HealthChecks.UI.Data.Tests.csproj
--no-restore
--no-build
--collect "XPlat Code Coverage"
--results-directory .coverage
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
flags: UI
directory: .coverage