Skip to content

Commit 26f3423

Browse files
authored
chore: Conditionally run net471 tests on windows only. (#42)
1 parent e295a13 commit 26f3423

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/actions/ci/action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ runs:
1414
with:
1515
dotnet-version: |
1616
6.0
17-
7.0
1817
8.0
1918
2019
- name: Restore dotnet dependencies
@@ -27,6 +26,15 @@ runs:
2726
id: build
2827
run: dotnet build
2928

29+
- name: Conditional Build Frameworks For Tests
30+
shell: bash
31+
run: |
32+
if [ "$RUNNER_OS" == "Windows" ]; then
33+
echo "BUILDFRAMEWORKS=net471;net6.0;net8.0" >> "$GITHUB_ENV"
34+
else
35+
echo "BUILDFRAMEWORKS=net6.0;net8.0" >> "$GITHUB_ENV"
36+
fi
37+
3038
- name: Run Tests
3139
if: steps.build.outcome == 'success' && inputs.run_tests == 'true'
3240
shell: bash

test/LaunchDarkly.OpenFeature.ServerProvider.Tests/ClientIntegrationTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public async Task ItHandlesValidInitializationWhenClientIsImmediatelyReady()
3535
Assert.Equal(1, readyCount);
3636
}
3737

38+
#if NET6_0_OR_GREATER
3839
[Fact(Timeout = 5000)]
3940
public async Task ItHandlesValidInitializationWhenClientIsReadyAfterADelay()
4041
{
@@ -118,5 +119,6 @@ public async Task ItHandlesFailedInitialization()
118119
Thread.Sleep(100);
119120
Assert.Equal(1, errorCount);
120121
}
122+
#endif
121123
}
122124
}

0 commit comments

Comments
 (0)