Skip to content

bit platform full CI #130

bit platform full CI

bit platform full CI #130

Workflow file for this run

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: "ClassName!~PageTests"
BLAZOR_SERVER_TEST_FILTER: "ClassName~PageTests.BlazorServer"
BLAZOR_WASM_TEST_FILTER: "ClassName~PageTests.BlazorWebAssembly"
MULTILINGUAL_DISABLED_TEST_FILTER: "ClassName!~LocalizationTests|TestCategory=MultilingualDisabled"
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 && 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 --framework net8.0
cd SimpleTest/src/Server/SimpleTest.Server.Api/
dotnet tool restore
dotnet ef migrations add InitialMigration --verbose
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 --verbose
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 --advancedTests --framework net8.0
cd TestSqlServer/src/Server/TestSqlServer.Server.Api/
dotnet tool restore
dotnet ef migrations add InitialMigration --verbose
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 Multilingual disabled option
id: multilingual-disabled-test
run: |
dotnet new bit-bp --name MultilingualDisabled --database Sqlite --advancedTests --framework net8.0
cd MultilingualDisabled/src/Server/MultilingualDisabled.Server.Api/
dotnet tool restore
dotnet ef migrations add InitialMigration --verbose
dotnet ef database update
cd ../../Tests
- name: Upload Tests Artifact
uses: actions/[email protected]
if: ${{ !env.ACT && failure() && steps.multilingual-disabled-test.conclusion == 'failure' }}
with:
name: tests-artifact
path: ./MultilingualDisabled/src/Tests/TestResults
retention-days: 14
- name: Test PostgreSQL, MySql, Other database options
run: |
dotnet new bit-bp --name TestPostgreSQL --database PostgreSQL --framework net8.0
cd TestPostgreSQL/src/Server/TestPostgreSQL.Server.Api/
dotnet build
cd ../../../../
dotnet new bit-bp --name TestMySql --database MySql --framework net8.0
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 --framework net8.0
cd TestLocal/src/Server/TestLocal.Server.Api/
dotnet build
cd ../../../../
dotnet new bit-bp --name TestAzureBlobStorage --filesStorage AzureBlobStorage --framework net9.0
cd TestAzureBlobStorage/src/Server/TestAzureBlobStorage.Server.Api/
dotnet build
- name: Test backend setup options
run: |
dotnet new bit-bp --name TestStandalone --api Standalone --framework net8.0
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 --framework net9.0
cd TestIntegrated/src/Server/TestIntegrated.Server.Web/
dotnet build
- name: Test sample configuration 1
run: |
dotnet new bit-bp --name TestProject --database SqlServer --filesStorage AzureBlobStorage --api Integrated --captcha reCaptcha --pipeline Azure --sample Admin --offlineDb --windows --appInsights --sentry --signalR --notification --framework net9.0
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 --sentry false --signalR false --notification false --framework net8.0
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 --framework net8.0
- name: Build blazor empty based projects
run: |
dotnet build AutoGlobal/AutoGlobal.sln
dotnet build SsrPerPage/SsrPerPage.csproj