Skip to content

Commit

Permalink
Tweak workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
andystaples committed Jan 29, 2025
1 parent 07997ab commit 366d14f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/E2ETest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,35 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Setup E2E tests
shell: pwsh
run: |
.\test\e2e\Tests\build-e2e-test.ps1
.\test\e2e\Tests\build-e2e-test.ps1 -SkipStorageEmulator
- name: Build
working-directory: test/e2e/Tests
run: dotnet build
- name: Test with the dotnet CLI
working-directory: test/e2e/Tests
run: dotnet test

# Install Azurite
- name: Set up Node.js (needed for Azurite)
uses: actions/setup-node@v3
with:
node-version: '18.x' # Azurite requires at least Node 18

- name: Install Azurite
run: npm install -g azurite

- name: Run E2E tests
working-directory: test/e2e/Tests
run: dotnet test
8 changes: 5 additions & 3 deletions test/e2e/Tests/build-e2e-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ param(
$SkipStorageEmulator,

[Switch]
$SkipCosmosDBEmulator,
$StartCosmosDBEmulator,

[Switch]
$SkipCoreTools,
Expand Down Expand Up @@ -145,15 +145,17 @@ dotnet build app.csproj

Set-Location $PSScriptRoot

if ($SkipStorageEmulator -And $SkipCosmosDBEmulator)
if ($SkipStorageEmulator -And -not $StartCosmosDBEmulator)
{
Write-Host
Write-Host "---Skipping emulator startup---"
Write-Host
}
else
{
.\start-emulators.ps1 -SkipStorageEmulator:$SkipStorageEmulator -StartCosmosDBEmulator:$false -EmulatorStartDir $ProjectTemporaryPath
.\start-emulators.ps1 -SkipStorageEmulator:$SkipStorageEmulator -StartCosmosDBEmulator:$StartCosmosDBEmulator -EmulatorStartDir $ProjectTemporaryPath
}

Set-Location $PSScriptRoot

StopOnFailedExecution

0 comments on commit 366d14f

Please sign in to comment.