[AZ-1132] Use system protoc in run-tests SDK container
ci/woodpecker/push/02-build-push/2 Pipeline is pending
ci/woodpecker/push/01-test Pipeline was successful
ci/woodpecker/push/02-build-push/1 Pipeline was successful

Install protobuf-compiler and set PROTOBUF_PROTOC on arm64
where Grpc.Tools bundled protoc segfaults; align Woodpecker.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-06-26 17:16:02 +03:00
parent b3e5a66799
commit 24b8aa3076
4 changed files with 21 additions and 10 deletions
+13 -4
View File
@@ -63,6 +63,17 @@ EOF
}
ensure_dev_cert
# Grpc.Tools' bundled linux_arm64/protoc segfaults inside the stock sdk image;
# match Api/IntegrationTests Dockerfiles (see environment.md).
sdk_container_sh() {
docker run --rm -v "$PROJECT_ROOT:/src" -w /src mcr.microsoft.com/dotnet/sdk:10.0 \
sh -c 'apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends protobuf-compiler \
&& rm -rf /var/lib/apt/lists/* \
&& export PROTOBUF_PROTOC=/usr/bin/protoc \
&& '"$1"
}
usage() {
cat <<EOF
Usage: $(basename "$0") [--unit-only | --smoke | --full] [--skip-format] [--keep-state]
@@ -131,8 +142,7 @@ fi
if [[ "$mode" == "unit" ]]; then
echo "Running unit tests only..."
docker run --rm -v "$PROJECT_ROOT:/src" -w /src mcr.microsoft.com/dotnet/sdk:10.0 \
sh -c "dotnet restore SatelliteProvider.sln && dotnet test SatelliteProvider.Tests/SatelliteProvider.Tests.csproj --no-restore --configuration Release --collect:'XPlat Code Coverage' --results-directory /src/TestResults --logger 'console;verbosity=normal'"
sdk_container_sh "dotnet restore SatelliteProvider.sln && dotnet test SatelliteProvider.Tests/SatelliteProvider.Tests.csproj --no-restore --configuration Release --collect:'XPlat Code Coverage' --results-directory /src/TestResults --logger 'console;verbosity=normal'"
echo ""
echo "=== Unit tests complete (coverage written to ./TestResults/) ==="
exit 0
@@ -174,8 +184,7 @@ export JWT_ISSUER
export JWT_AUDIENCE
echo "Step 1: Unit tests"
docker run --rm -v "$PROJECT_ROOT:/src" -w /src mcr.microsoft.com/dotnet/sdk:10.0 \
sh -c "dotnet restore SatelliteProvider.sln && dotnet test SatelliteProvider.Tests/SatelliteProvider.Tests.csproj --no-restore --configuration Release --collect:'XPlat Code Coverage' --results-directory /src/TestResults --logger 'console;verbosity=normal'"
sdk_container_sh "dotnet restore SatelliteProvider.sln && dotnet test SatelliteProvider.Tests/SatelliteProvider.Tests.csproj --no-restore --configuration Release --collect:'XPlat Code Coverage' --results-directory /src/TestResults --logger 'console;verbosity=normal'"
echo ""
echo "Step 2: Integration tests (Docker Compose, mode=$mode, keep_state=$keep_state)"