bit platform full CI #116
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: bit platform full CI | |
on: | |
workflow_dispatch: | |
env: | |
ConnectionStrings__SqlServerConnectionString: 'Data Source=localhost; Initial Catalog=BoilerplateTestDb;Application Name=Boilerplate;TrustServerCertificate=True;User Id=sa;Password=P@ssw0rdP@ssw0rd;' | |
SIMPLE_TEST_FILTER: "FullyQualifiedName!~PageTests" | |
BLAZOR_SERVER_TEST_FILTER: "PageTests.BlazorServer" | |
BLAZOR_WASM_TEST_FILTER: "PageTests.BlazorWebAssembly" | |
jobs: | |
build: | |
name: build and test | |
runs-on: ubuntu-24.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 | |
- name: Setup .NET 8 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
8.0.x | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Uninstall Bit.Boilerplate if running on ACT | |
continue-on-error: true | |
if: ${{ env.ACT }} | |
run: dotnet new uninstall Bit.Boilerplate | |
- name: Prepare environment | |
run: | | |
cd src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/ | |
sed -i 's|"ServerAddress": "http://localhost:5030/",|"ServerAddress": "/",|' appsettings.json | |
cd ../../../../ && 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-tools-net8 | |
${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: Simple tests (no --advancedTests) | |
id: simple-test | |
run: | | |
dotnet new bit-bp --name SimpleTest --database Sqlite | |
cd SimpleTest/src/Server/SimpleTest.Server.Api/ | |
dotnet tool restore | |
dotnet ef migrations add InitialMigration | |
dotnet ef database update | |
cd ../../Tests | |
dotnet build | |
pwsh bin/Debug/net8.0/playwright.ps1 install --with-deps | |
- name: Upload Tests Artifact | |
uses: actions/[email protected] | |
if: ${{ !env.ACT && failure() && steps.simple-test.conclusion == 'failure' }} | |
with: | |
name: tests-artifact | |
path: ./SimpleTest/src/Tests/TestResults | |
retention-days: 14 | |
- name: Test Sqlite database option | |
id: sqlite-test | |
run: | | |
dotnet new bit-bp --name TestSqlite --database Sqlite --advancedTests --framework net9.0 | |
cd TestSqlite/src/Server/TestSqlite.Server.Api/ | |
dotnet tool restore | |
dotnet ef migrations add InitialMigration | |
dotnet ef database update | |
cd ../../Tests | |
dotnet build | |
pwsh bin/Debug/net9.0/playwright.ps1 install --with-deps | |
- name: Upload Tests Artifact | |
uses: actions/[email protected] | |
if: ${{ !env.ACT && failure() && steps.sqlite-test.conclusion == 'failure' }} | |
with: | |
name: tests-artifact | |
path: ./TestSqlite/src/Tests/TestResults | |
retention-days: 14 | |
- name: Test SqlServer database option | |
id: sqlserver-test | |
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 | |
- name: Upload Tests Artifact | |
uses: actions/[email protected] | |
if: ${{ !env.ACT && failure() && steps.sqlserver-test.conclusion == 'failure' }} | |
with: | |
name: tests-artifact | |
path: ./TestSqlServer/src/Tests/TestResults | |
retention-days: 14 | |
- 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 --framework net9.0 | |
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 --framework net9.0 | |
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 --windows --appInsights --appCenter --signalr --notification | |
dotnet build TestProject/TestProject.sln -p:MultilingualEnabled=true -p:PwaEnabled=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 --notification false | |
dotnet build TestProject2/TestProject2.sln -p:MultilingualEnabled=false -p:PwaEnabled=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 -f net9.0 | |
- 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 --framework net9.0 | |
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 |