diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 62a483f4d2..34af3b7895 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -84,7 +84,7 @@ "BenchmarkDotNet", "BitPay.Light", "Braintree", - "coverlet.collector", + "Microsoft.Testing.Extensions.CodeCoverage", "CsvHelper", "Kralizek.AutoFixture.Extensions.MockHttp", "Microsoft.AspNetCore.Mvc.Testing", diff --git a/.github/workflows/test-database.yml b/.github/workflows/test-database.yml index 20bc67bc6b..3ace78d3c3 100644 --- a/.github/workflows/test-database.yml +++ b/.github/workflows/test-database.yml @@ -136,7 +136,7 @@ jobs: # Bitwarden Lite MariaDB BW_TEST_DATABASES__4__TYPE: "MySql" BW_TEST_DATABASES__4__CONNECTIONSTRING: "server=localhost;port=4306;uid=root;pwd=mariadb-password;database=vault_dev;Allow User Variables=true" - run: dotnet test --logger "trx;LogFileName=infrastructure-test-results.trx" /p:CoverletOutputFormatter="cobertura" --collect:"XPlat Code Coverage" + run: dotnet test -- --coverage --coverage-output-format cobertura --coverage-output "coverage.cobertura.xml" --report-xunit-trx --report-xunit-trx-filename "test-results.trx" shell: pwsh - name: Print MySQL Logs @@ -240,7 +240,7 @@ jobs: echo " - SQL project files: src/Sql/" echo " - Download 'report.xml' artifact for full details" echo "" - + # Show actual SQL differences - exclude database setup commands if [ -s "diff.sql" ]; then echo "Key SQL differences:" @@ -248,9 +248,9 @@ jobs: grep -E "^(CREATE|DROP|ALTER)" diff.sql | grep -v "ALTER DATABASE" | grep -v "DatabaseName" | head -5 echo "" fi - + echo "Common causes: naming differences (underscores, case), missing objects, or definition mismatches" - + exit 1 else echo "SUCCESS: Database validation passed" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36ab8785d5..8497b8180b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,10 +53,10 @@ jobs: run: dotnet sln bitwarden-server.sln remove src/Sql/Sql.sqlproj - name: Test OSS solution - run: dotnet test ./test --configuration Debug --logger "trx;LogFileName=oss-test-results.trx" /p:CoverletOutputFormatter="cobertura" --collect:"XPlat Code Coverage" + run: dotnet test ./test --configuration Debug -- --coverage --coverage-output-format cobertura --coverage-output "coverage.cobertura.xml" --report-xunit-trx --report-xunit-trx-filename "test-results.trx" - name: Test Bitwarden solution - run: dotnet test ./bitwarden_license/test --configuration Debug --logger "trx;LogFileName=bw-test-results.trx" /p:CoverletOutputFormatter="cobertura" --collect:"XPlat Code Coverage" + run: dotnet test ./bitwarden_license/test --configuration Debug -- --coverage --coverage-output-format cobertura --coverage-output "coverage.cobertura.xml" --report-xunit-trx --report-xunit-trx-filename "test-results.trx" - name: Report test results uses: dorny/test-reporter@890a17cecf52a379fc869ab770a71657660be727 # v2.1.0 diff --git a/Directory.Build.props b/Directory.Build.props index 73a51fac8b..66cac5d852 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -20,6 +20,10 @@ true + + + + 17.8.0 @@ -28,8 +32,6 @@ 3.1.4 - 6.0.0 - 5.1.0 4.19.0 diff --git a/bitwarden_license/test/Commercial.Core.Test/Commercial.Core.Test.csproj b/bitwarden_license/test/Commercial.Core.Test/Commercial.Core.Test.csproj index 7249b441b9..f215babd89 100644 --- a/bitwarden_license/test/Commercial.Core.Test/Commercial.Core.Test.csproj +++ b/bitwarden_license/test/Commercial.Core.Test/Commercial.Core.Test.csproj @@ -6,10 +6,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/bitwarden_license/test/SSO.Test/SSO.Test.csproj b/bitwarden_license/test/SSO.Test/SSO.Test.csproj index 260f9ece02..ca2efac97a 100644 --- a/bitwarden_license/test/SSO.Test/SSO.Test.csproj +++ b/bitwarden_license/test/SSO.Test/SSO.Test.csproj @@ -11,10 +11,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/bitwarden_license/test/Scim.IntegrationTest/Scim.IntegrationTest.csproj b/bitwarden_license/test/Scim.IntegrationTest/Scim.IntegrationTest.csproj index 270a970701..6c820ba885 100644 --- a/bitwarden_license/test/Scim.IntegrationTest/Scim.IntegrationTest.csproj +++ b/bitwarden_license/test/Scim.IntegrationTest/Scim.IntegrationTest.csproj @@ -1,30 +1,26 @@ - - - - false - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - true - PreserveNewest - Never - - - + + + + false + + + + + + + + + + + + + + + + + true + PreserveNewest + Never + + + diff --git a/bitwarden_license/test/Scim.Test/Scim.Test.csproj b/bitwarden_license/test/Scim.Test/Scim.Test.csproj index 8ad2d23ecf..8dcbbb9e1d 100644 --- a/bitwarden_license/test/Scim.Test/Scim.Test.csproj +++ b/bitwarden_license/test/Scim.Test/Scim.Test.csproj @@ -1,20 +1,16 @@ - - - - false - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - + + + + false + + + + + + + + + + + + diff --git a/test/Admin.Test/Admin.Test.csproj b/test/Admin.Test/Admin.Test.csproj index 19772fe8fc..2141f1f0b2 100644 --- a/test/Admin.Test/Admin.Test.csproj +++ b/test/Admin.Test/Admin.Test.csproj @@ -4,10 +4,6 @@ Admin.Test - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/test/Api.IntegrationTest/Api.IntegrationTest.csproj b/test/Api.IntegrationTest/Api.IntegrationTest.csproj index 58d5eb50e3..35ff92cd68 100644 --- a/test/Api.IntegrationTest/Api.IntegrationTest.csproj +++ b/test/Api.IntegrationTest/Api.IntegrationTest.csproj @@ -5,10 +5,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/test/Api.Test/Api.Test.csproj b/test/Api.Test/Api.Test.csproj index 9e3496e94a..9d3d404ae5 100644 --- a/test/Api.Test/Api.Test.csproj +++ b/test/Api.Test/Api.Test.csproj @@ -5,10 +5,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/test/Billing.Test/Billing.Test.csproj b/test/Billing.Test/Billing.Test.csproj index d56128e0ef..cc39a74a46 100644 --- a/test/Billing.Test/Billing.Test.csproj +++ b/test/Billing.Test/Billing.Test.csproj @@ -7,10 +7,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/test/Core.IntegrationTest/Core.IntegrationTest.csproj b/test/Core.IntegrationTest/Core.IntegrationTest.csproj index 516c9d5651..11afe3f6d0 100644 --- a/test/Core.IntegrationTest/Core.IntegrationTest.csproj +++ b/test/Core.IntegrationTest/Core.IntegrationTest.csproj @@ -10,7 +10,6 @@ - diff --git a/test/Core.Test/Core.Test.csproj b/test/Core.Test/Core.Test.csproj index 2fe6b4feda..060de5be3d 100644 --- a/test/Core.Test/Core.Test.csproj +++ b/test/Core.Test/Core.Test.csproj @@ -4,10 +4,6 @@ Bit.Core.Test - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - @@ -24,7 +20,7 @@ - + diff --git a/test/Events.IntegrationTest/Events.IntegrationTest.csproj b/test/Events.IntegrationTest/Events.IntegrationTest.csproj index ee63ec03cf..de821b98fa 100644 --- a/test/Events.IntegrationTest/Events.IntegrationTest.csproj +++ b/test/Events.IntegrationTest/Events.IntegrationTest.csproj @@ -1,23 +1,19 @@ - - - - net8.0 - enable - false - true - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - + + + + net8.0 + enable + false + true + + + + + + + + + + + + diff --git a/test/Events.Test/Events.Test.csproj b/test/Events.Test/Events.Test.csproj index 39f7a589da..17ab9340e8 100644 --- a/test/Events.Test/Events.Test.csproj +++ b/test/Events.Test/Events.Test.csproj @@ -4,10 +4,6 @@ Events.Test - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/test/EventsProcessor.Test/EventsProcessor.Test.csproj b/test/EventsProcessor.Test/EventsProcessor.Test.csproj index a69e8b6e1a..49e4e9d4e9 100644 --- a/test/EventsProcessor.Test/EventsProcessor.Test.csproj +++ b/test/EventsProcessor.Test/EventsProcessor.Test.csproj @@ -4,10 +4,6 @@ EventsProcessor.Test - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/test/Icons.Test/Icons.Test.csproj b/test/Icons.Test/Icons.Test.csproj index 4bbc18118a..e8c1acb94f 100644 --- a/test/Icons.Test/Icons.Test.csproj +++ b/test/Icons.Test/Icons.Test.csproj @@ -5,10 +5,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/test/Identity.IntegrationTest/Identity.IntegrationTest.csproj b/test/Identity.IntegrationTest/Identity.IntegrationTest.csproj index 165821a8e6..70dac627ac 100644 --- a/test/Identity.IntegrationTest/Identity.IntegrationTest.csproj +++ b/test/Identity.IntegrationTest/Identity.IntegrationTest.csproj @@ -6,10 +6,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/test/Identity.Test/Identity.Test.csproj b/test/Identity.Test/Identity.Test.csproj index 76847faca8..81cd3b609d 100644 --- a/test/Identity.Test/Identity.Test.csproj +++ b/test/Identity.Test/Identity.Test.csproj @@ -5,10 +5,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/test/Infrastructure.Dapper.Test/Infrastructure.Dapper.Test.csproj b/test/Infrastructure.Dapper.Test/Infrastructure.Dapper.Test.csproj index 8579e46686..aa3ff8f6ff 100644 --- a/test/Infrastructure.Dapper.Test/Infrastructure.Dapper.Test.csproj +++ b/test/Infrastructure.Dapper.Test/Infrastructure.Dapper.Test.csproj @@ -1,22 +1,18 @@ - - - - net8.0 - enable - false - true - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - + + + + net8.0 + enable + false + true + + + + + + + + + + + diff --git a/test/Infrastructure.EFIntegration.Test/Infrastructure.EFIntegration.Test.csproj b/test/Infrastructure.EFIntegration.Test/Infrastructure.EFIntegration.Test.csproj index 392b20e10b..61082ef8b8 100644 --- a/test/Infrastructure.EFIntegration.Test/Infrastructure.EFIntegration.Test.csproj +++ b/test/Infrastructure.EFIntegration.Test/Infrastructure.EFIntegration.Test.csproj @@ -3,10 +3,6 @@ false - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/test/Infrastructure.IntegrationTest/Infrastructure.IntegrationTest.csproj b/test/Infrastructure.IntegrationTest/Infrastructure.IntegrationTest.csproj index 8782e17360..ec60e19abc 100644 --- a/test/Infrastructure.IntegrationTest/Infrastructure.IntegrationTest.csproj +++ b/test/Infrastructure.IntegrationTest/Infrastructure.IntegrationTest.csproj @@ -12,10 +12,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/test/Notifications.Test/Notifications.Test.csproj b/test/Notifications.Test/Notifications.Test.csproj index a0abd45e2d..91856466ce 100644 --- a/test/Notifications.Test/Notifications.Test.csproj +++ b/test/Notifications.Test/Notifications.Test.csproj @@ -4,10 +4,6 @@ Notifications.Test - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - diff --git a/test/SharedWeb.Test/SharedWeb.Test.csproj b/test/SharedWeb.Test/SharedWeb.Test.csproj index bfb05dd32a..2e5d7f236c 100644 --- a/test/SharedWeb.Test/SharedWeb.Test.csproj +++ b/test/SharedWeb.Test/SharedWeb.Test.csproj @@ -4,10 +4,6 @@ SharedWeb.Test - - runtime; build; native; contentfiles; analyzers; buildtransitive - all -