From 2663467914d8ce87931f59eb52178abda867f9cc Mon Sep 17 00:00:00 2001 From: Korolev Dmitry Date: Tue, 4 Nov 2025 13:38:05 +0100 Subject: [PATCH] add azurite as dependency for dotnet tests --- .github/workflows/dotnet-build-and-test.yml | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/dotnet-build-and-test.yml b/.github/workflows/dotnet-build-and-test.yml index 1a51f94119..02be58079b 100644 --- a/.github/workflows/dotnet-build-and-test.yml +++ b/.github/workflows/dotnet-build-and-test.yml @@ -80,6 +80,29 @@ jobs: uses: actions/setup-dotnet@v5.0.0 with: global-json-file: ${{ github.workspace }}/dotnet/global.json + + - name: Setup Azurite (Azure Storage Emulator) + if: matrix.integration-tests + shell: bash + run: | + # Install Azurite globally using npm (available on all GitHub runners) + npm install -g azurite + + # Start Azurite in the background + if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then + # On Linux, use nohup to run in background + nohup azurite --silent --location /tmp/azurite --debug /tmp/azurite/debug.log & + # Wait for Azurite to be ready + timeout 30 bash -c 'until curl -f http://localhost:10000 2>/dev/null; do sleep 1; done' + else + # On Windows, use PowerShell to start in background + powershell -Command "Start-Process azurite -ArgumentList '--silent', '--location', '$env:TEMP\azurite', '--debug', '$env:TEMP\azurite\debug.log' -WindowStyle Hidden" + # Wait for Azurite to be ready (simple sleep since curl might not be available) + sleep 10 + fi + + echo "Azurite started successfully" + - name: Build dotnet solutions shell: bash run: |