Skip to content
Merged
7 changes: 4 additions & 3 deletions .github/workflows/Steeltoe.All.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- os: macos-latest
skipIntegrationTests: true
runs-on: ${{ matrix.os }}
continue-on-error: true

services:
eurekaServer:
Expand Down Expand Up @@ -91,13 +90,15 @@ jobs:
run: dotnet build ${{ env.SOLUTION_FILE }} --no-restore --configuration Release --verbosity minimal

- name: Test
id: test
run: dotnet test ${{ env.SOLUTION_FILE }} --filter "${{ matrix.skipIntegrationTests == true && 'Category!=MemoryDumps&Category!=Integration' || 'Category!=MemoryDumps' }}" ${{ env.COMMON_TEST_ARGS }}

- name: Test (memory dumps)
id: test-memory-dumps
run: dotnet test src/Management/test/Endpoint.Test --filter "Category=MemoryDumps" ${{ env.COMMON_TEST_ARGS }}

- name: Upload crash/hang dumps (on failure)
if: ${{ failure() }}
if: ${{ !cancelled() && (steps.test.outcome == 'failure' || steps.test-memory-dumps.outcome == 'failure') }}
uses: actions/upload-artifact@v5
with:
name: FailedTestOutput-${{ matrix.os }}
Expand All @@ -107,7 +108,7 @@ jobs:
if-no-files-found: ignore

- name: Report test results
if: ${{ !cancelled() }}
if: ${{ !cancelled() && (steps.test.outcome != 'skipped' || steps.test-memory-dumps.outcome != 'skipped') }}
uses: dorny/test-reporter@v2
with:
name: ${{ matrix.os }} test results
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/component-shared-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,16 @@ jobs:
run: dotnet build ${{ env.SOLUTION_FILE }} --no-restore --configuration Release --verbosity minimal

- name: Test
id: test
run: dotnet test ${{ env.SOLUTION_FILE }} --filter "Category!=MemoryDumps" ${{ env.COMMON_TEST_ARGS }}

- name: Test (memory dumps)
id: test-memory-dumps
if: ${{ inputs.component == 'Management' }}
run: dotnet test src/Management/test/Endpoint.Test --filter "Category=MemoryDumps" ${{ env.COMMON_TEST_ARGS }}

- name: Upload crash/hang dumps (on failure)
if: ${{ failure() }}
if: ${{ !cancelled() && (steps.test.outcome == 'failure' || steps.test-memory-dumps.outcome == 'failure') }}
uses: actions/upload-artifact@v5
with:
name: FailedTestOutput-${{ inputs.OS }}-latest
Expand All @@ -98,7 +100,7 @@ jobs:
if-no-files-found: ignore

- name: Report test results
if: ${{ !cancelled() }}
if: ${{ !cancelled() && (steps.test.outcome != 'skipped' || steps.test-memory-dumps.outcome != 'skipped') }}
uses: dorny/test-reporter@v2
with:
name: ${{ inputs.OS }}-latest test results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public async Task Canceled_Throws()
cosmosClientMock.Setup(client => client.ReadAccountAsync()).Returns(async () =>
{
await Task.Delay(3.Seconds(), TestContext.Current.CancellationToken);
return null!;
return null;
});

await using ServiceProvider serviceProvider = CreateServiceProvider(serviceName, connectionString, cosmosClientMock.Object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public async Task Adds_random_number_to_instance_ID_when_ports_are_zero()
EurekaInstanceOptions instanceOptions = optionsMonitor.CurrentValue;

instanceOptions.InstanceId.Should().NotBeNull();
string[] parts = instanceOptions.InstanceId!.Split(':');
string[] parts = instanceOptions.InstanceId.Split(':');
parts.Should().HaveCount(3);

int.TryParse(parts[2], CultureInfo.InvariantCulture, out int number).Should().BeTrue();
Expand Down
Loading