use services

This commit is contained in:
Korolev Dmitry
2025-11-04 13:49:50 +01:00
Unverified
parent 8baacc4fe3
commit 3f7b0d1085
+8 -22
View File
@@ -64,6 +64,14 @@ jobs:
- { targetFramework: "net9.0", os: "windows-latest", configuration: Release }
- { targetFramework: "net472", os: "windows-latest", configuration: Release, integration-tests: true, environment: "integration" }
services:
azurite:
image: mcr.microsoft.com/azure-storage/azurite:latest
ports:
- 10000:10000
- 10001:10001
- 10002:10002
runs-on: ${{ matrix.os }}
environment: ${{ matrix.environment }}
steps:
@@ -80,28 +88,6 @@ 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