mirror of
https://github.com/bitwarden/server.git
synced 2024-11-24 12:35:25 +01:00
Move CI testing to Ubuntu (#2638)
Change the CI for testing job from Windows to Ubuntu
This commit is contained in:
parent
2646d9200c
commit
9ea520e038
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
@ -38,7 +38,7 @@ jobs:
|
||||
|
||||
testing:
|
||||
name: Testing
|
||||
runs-on: windows-2022
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
||||
steps:
|
||||
@ -46,13 +46,10 @@ jobs:
|
||||
uses: actions/setup-dotnet@9211491ffb35dd6a6657ca4f45d43dfe6e97c829
|
||||
with:
|
||||
dotnet-version: "6.0.x"
|
||||
- name: Set up MSBuild
|
||||
uses: microsoft/setup-msbuild@ab534842b4bdf384b8aaf93765dc6f721d9f5fab
|
||||
|
||||
- name: Print environment
|
||||
run: |
|
||||
dotnet --info
|
||||
msbuild -version
|
||||
nuget help | grep Version
|
||||
echo "GitHub ref: $GITHUB_REF"
|
||||
echo "GitHub event: $GITHUB_EVENT"
|
||||
@ -64,20 +61,23 @@ jobs:
|
||||
run: dotnet restore --locked-mode
|
||||
shell: pwsh
|
||||
|
||||
- name: Remove SQL proj
|
||||
run: dotnet sln bitwarden-server.sln remove src/Sql/Sql.sqlproj
|
||||
|
||||
- name: Build OSS solution
|
||||
run: msbuild bitwarden-server.sln /p:Configuration=Debug /p:DefineConstants="OSS" /verbosity:minimal
|
||||
run: dotnet build bitwarden-server.sln -p:Configuration=Debug -p:DefineConstants="OSS" --verbosity minimal
|
||||
shell: pwsh
|
||||
|
||||
- name: Build solution
|
||||
run: msbuild bitwarden-server.sln /p:Configuration=Debug /verbosity:minimal
|
||||
run: dotnet build bitwarden-server.sln -p:Configuration=Debug --verbosity minimal
|
||||
shell: pwsh
|
||||
|
||||
- name: Test OSS solution
|
||||
run: dotnet test ./test --configuration Debug --no-build --logger "trx;LogFileName=oss-test-results.trx" || true
|
||||
run: dotnet test ./test --configuration Debug --no-build --logger "trx;LogFileName=oss-test-results.trx"
|
||||
shell: pwsh
|
||||
|
||||
- name: Test Bitwarden solution
|
||||
run: dotnet test ./bitwarden_license/test --configuration Debug --no-build --logger "trx;LogFileName=bw-test-results.trx" || true
|
||||
run: dotnet test ./bitwarden_license/test --configuration Debug --no-build --logger "trx;LogFileName=bw-test-results.trx"
|
||||
shell: pwsh
|
||||
|
||||
- name: Report test results
|
||||
|
@ -8,6 +8,8 @@ using Microsoft.AspNetCore.TestHost;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
|
||||
namespace Bit.IntegrationTestCommon.Factories;
|
||||
|
||||
@ -108,6 +110,9 @@ public abstract class WebApplicationFactoryBase<T> : WebApplicationFactory<T>
|
||||
|
||||
// Fix IP Rate Limiting
|
||||
services.AddSingleton<IStartupFilter, CustomStartupFilter>();
|
||||
|
||||
// Disable logs
|
||||
services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user