-
-
Notifications
You must be signed in to change notification settings - Fork 232
145 lines (121 loc) · 5.69 KB
/
bit.full.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
name: bit platform full CI
on:
workflow_dispatch:
env:
ConnectionStrings__SqlServerConnectionString: 'Data Source=localhost; Initial Catalog=BoilerplateDb;Application Name=Boilerplate;TrustServerCertificate=True;User Id=sa;Password=P@ssw0rdP@ssw0rd;'
jobs:
build:
name: build and test
runs-on: ubuntu-22.04
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: src/global.json
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Prepare environment
run: |
cd src/Templates/Boilerplate && dotnet build -c Release
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg && cd ../../../
dotnet workload install maui-tizen maui-android wasm-tools wasm-experimental
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools"
- name: Install sql server
uses: potatoqualitee/[email protected]
with:
install: sqlengine
sa-password: P@ssw0rdP@ssw0rd
show-log: true
- name: Test Sqlite database option
run: |
dotnet new bit-bp --name TestSqlite --database Sqlite
cd TestSqlite/src/Server/TestSqlite.Server.Api/
dotnet tool restore
dotnet ef migrations add InitialMigration
dotnet ef database update
cd ../../Tests
dotnet test
- name: Test SqlServer database option
run: |
dotnet new bit-bp --name TestSqlServer --database SqlServer
cd TestSqlServer/src/Server/TestSqlServer.Server.Api/
dotnet tool restore
dotnet ef migrations add InitialMigration
dotnet ef database update
cd ../../Tests
dotnet test
- name: Test PostgreSQL, Cosmos, MySql, Other database options
run: |
dotnet new bit-bp --name TestPostgreSQL --database PostgreSQL
cd TestPostgreSQL/src/Server/TestPostgreSQL.Server.Api/
dotnet build
cd ../../../../
dotnet new bit-bp --name TestCosmos --database Cosmos
cd TestCosmos/src/Server/TestCosmos.Server.Api/
dotnet build
cd ../../../../
dotnet new bit-bp --name TestMySql --database MySql
cd TestMySql/src/Server/TestMySql.Server.Api/
dotnet build
cd ../../../../
dotnet new bit-bp --name TestOther --database Other
cd TestOther/src/Server/TestOther.Server.Api/
dotnet build
- name: Test file storage options
run: |
dotnet new bit-bp --name TestLocal --filesStorage Local
cd TestLocal/src/Server/TestLocal.Server.Api/
dotnet build
cd ../../../../
dotnet new bit-bp --name TestAzureBlobStorage --filesStorage AzureBlobStorage
cd TestAzureBlobStorage/src/Server/TestAzureBlobStorage.Server.Api/
dotnet build
- name: Test backend setup options
run: |
dotnet new bit-bp --name TestStandalone --api Standalone
cd TestStandalone/src/Server/TestStandalone.Server.Api/
dotnet build
cd ../
cd TestStandalone.Server.Web/
dotnet build
cd ../../../../
dotnet new bit-bp --name TestIntegrated --api Integrated
cd TestIntegrated/src/Server/TestIntegrated.Server.Web/
dotnet build
- name: Test sample configuration 1
run: |
dotnet new bit-bp --name TestProject --database Cosmos --filesStorage AzureBlobStorage --api Integrated --captcha reCaptcha --pipeline Azure --sample Admin --offlineDb true --windows true --appInsights true --appCenter true --signalr true
dotnet build TestProject/TestProject.sln -p:MultilingualEnabled=true -p:PWA=true -p:BlazorWebAssemblyStandalone=true -p:Environment=Staging
- name: Test sample configuration 2
run: |
dotnet new bit-bp --name TestProject2 --database Other --filesStorage Other --api Standalone --captcha None --pipeline None --sample None --offlineDb false --windows false --appInsights false --appCenter false --signalr false
dotnet build TestProject2/TestProject2.sln -p:MultilingualEnabled=false -p:PWA=false -p:BlazorWebAssemblyStandalone=false -p:Environment=Development
- name: Run BeforeBuildTasks
continue-on-error: true # Error MSB4057, not all csproj files have BeforeBuildTasks target.
run: dotnet build src/Bit-CI-release.sln -t:BeforeBuildTasks -m:1
- name: Release build bit blazor ui + butil + bswup + besql + bup + code analyzers + source generators
run: dotnet build src/Bit-CI-release.sln -c Release
- name: Build careers, platform, sales websites
run: |
dotnet build src/Websites/Platform/Bit.Websites.Platform.sln
dotnet build src/Websites/Careers/Bit.Websites.Careers.sln
dotnet build src/Websites/Sales/Bit.Websites.Sales.sln
- name: Run bit blazor ui tests
run: dotnet test src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj
- name: Build bit blazor ui demo
run: dotnet build src/BlazorUI/Bit.BlazorUI.sln
- name: Create projects from BlazorEmpty project template with different parameters
run: |
cd src/Templates/BlazorEmpty && dotnet build -c Release
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.BlazorEmpty.0.0.0.nupkg && cd ../../../
dotnet new bit-empty --name AutoGlobal --interactivity Auto --all-interactive
dotnet new bit-empty --name SsrPerPage --interactivity None
- name: Build blazor empty based projects
run: |
dotnet build AutoGlobal/AutoGlobal.sln
dotnet build SsrPerPage/SsrPerPage.csproj