Skip to content

Commit 1718e27

Browse files
Copilotphilnach
andcommitted
Add vnext emulator testing with failure tolerance
Co-authored-by: philnach <[email protected]>
1 parent f13fa7f commit 1718e27

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.github/workflows/linux-cosmos-emulator-test.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,27 @@ on:
99

1010
jobs:
1111
cosmos_tests_linux:
12-
name: Run Cosmos .NET unit tests on Linux
12+
name: Run Cosmos .NET unit tests on Linux (${{ matrix.emulator_version.name }})
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
emulator_version: [
17+
{
18+
name: "current",
19+
image: "mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest",
20+
allow_failure: false
21+
},
22+
{
23+
name: "vnext",
24+
image: "mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview",
25+
allow_failure: true
26+
}
27+
]
28+
fail-fast: false
29+
continue-on-error: ${{ matrix.emulator_version.allow_failure }}
1430
services:
1531
cosmos-emulator:
16-
image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
32+
image: ${{ matrix.emulator_version.image }}
1733
ports:
1834
- 8081:8081
1935
- 10251:10251
@@ -46,7 +62,7 @@ jobs:
4662

4763
- name: Wait for Cosmos Emulator
4864
run: |
49-
echo "Waiting for Cosmos DB Emulator to be ready..."
65+
echo "Waiting for Cosmos DB Emulator (${{ matrix.emulator_version.name }}) to be ready..."
5066
timeout 300 bash -c 'until curl -f -k https://127.0.0.1:8081/_explorer/emulator.pem; do sleep 5; done'
5167
echo "Cosmos DB Emulator is ready!"
5268
@@ -58,7 +74,7 @@ jobs:
5874
5975
- name: Run Cosmos Extension Tests
6076
run: |
61-
echo "Running Cosmos extension unit tests with emulator connection..."
77+
echo "Running Cosmos extension unit tests with emulator connection (${{ matrix.emulator_version.name }})..."
6278
echo "Cosmos_Endpoint: $Cosmos_Endpoint"
6379
echo "Testing connectivity to emulator..."
6480
curl -k -s https://127.0.0.1:8081/_explorer/index.html > /dev/null && echo "Emulator is responding" || echo "Warning: Emulator may not be fully ready"

0 commit comments

Comments
 (0)