mirror of
https://github.com/bitwarden/server
synced 2026-01-03 00:53:37 +00:00
Switch to MTP for coverage
This commit is contained in:
8
.github/workflows/test-database.yml
vendored
8
.github/workflows/test-database.yml
vendored
@@ -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"
|
||||
|
||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user