From 2e81c7a4318df78b41aff3d433f02137e520da0b Mon Sep 17 00:00:00 2001 From: Tim Bussmann Date: Sun, 1 Dec 2024 00:30:09 +0100 Subject: [PATCH] use windows build agent for cosmosdb emulator --- .github/workflows/build.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d6ec3a..bf05420 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,11 +8,11 @@ on: branches: [ "master" ] pull_request: branches: [ "master" ] - + jobs: build: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - uses: actions/checkout@v4 @@ -24,15 +24,20 @@ jobs: run: dotnet restore - name: Build run: dotnet build --no-restore - - name: Azure login - uses: azure/login@v2.2.0 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - name: Setup Cosmos DB - uses: Particular/setup-cosmosdb-action@v1.0.0 - with: - connection-string-name: Annoy_O_Bot_ComsmosConnectionString - azure-credentials: ${{ secrets.AZURE_CREDENTIALS }} - tag: Annoy_O_Bot_Tests + # - name: Azure login + # uses: azure/login@v2.2.0 + # with: + # creds: ${{ secrets.AZURE_CREDENTIALS }} + # - name: Setup Cosmos DB + # uses: Particular/setup-cosmosdb-action@v1.0.0 + # with: + # connection-string-name: Annoy_O_Bot_ComsmosConnectionString + # azure-credentials: ${{ secrets.AZURE_CREDENTIALS }} + # tag: Annoy_O_Bot_Tests + - name: Start Azure Cosmos DB emulator + run: | + Write-Host "Launching Cosmos DB Emulator" + Import-Module "$env:ProgramFiles\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator" + Start-CosmosDbEmulator - name: Test run: dotnet test --no-build --verbosity normal