From 6d824477a5eaf9ff3cffb6217e5fa4fbfe9b0c9f Mon Sep 17 00:00:00 2001 From: Casey Waldren Date: Fri, 25 Oct 2024 11:11:51 -0700 Subject: [PATCH] build: enable client SDK unit tests in CI (#25) --- .github/actions/ci/action.yml | 10 +++++++++- .github/workflows/sdk-client-ci.yml | 3 ++- .../LaunchDarkly.ClientSdk.Tests.csproj | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/actions/ci/action.yml b/.github/actions/ci/action.yml index d2ce625b..ac3f7e12 100644 --- a/.github/actions/ci/action.yml +++ b/.github/actions/ci/action.yml @@ -7,6 +7,14 @@ inputs: test_project_file: description: 'Path to the test project file. If provided, run unit tests, otherwise skip them.' required: false + target_test_framework: + description: 'The target test framework to use.' + required: false + default: 'net6.0' + test_verbosity: + description: 'The verbosity level of the test output.' + required: false + default: 'normal' runs: using: composite @@ -35,4 +43,4 @@ runs: shell: bash run: | dotnet restore ${{ inputs.test_project_file }} - dotnet test --framework=net6.0 ${{ inputs.test_project_file }} + dotnet test -v=${{ inputs.test_verbosity }} --framework=${{ inputs.target_test_framework }} ${{ inputs.test_project_file }} diff --git a/.github/workflows/sdk-client-ci.yml b/.github/workflows/sdk-client-ci.yml index e3bff57c..0f43f8b1 100644 --- a/.github/workflows/sdk-client-ci.yml +++ b/.github/workflows/sdk-client-ci.yml @@ -36,6 +36,7 @@ jobs: with: project_file: ${{ env.PROJECT_FILE}} test_project_file: ${{ env.TEST_PROJECT_FILE}} + target_test_framework: "net7.0" - uses: ./.github/actions/contract-tests with: @@ -47,4 +48,4 @@ jobs: with: workspace_path: ${{ env.WORKSPACE_PATH}} -# TODO: resolve issue with emulator and device tests \ No newline at end of file +# TODO: resolve issue with emulator and device tests diff --git a/pkgs/sdk/client/test/LaunchDarkly.ClientSdk.Tests/LaunchDarkly.ClientSdk.Tests.csproj b/pkgs/sdk/client/test/LaunchDarkly.ClientSdk.Tests/LaunchDarkly.ClientSdk.Tests.csproj index 6f60edf9..ca3de204 100644 --- a/pkgs/sdk/client/test/LaunchDarkly.ClientSdk.Tests/LaunchDarkly.ClientSdk.Tests.csproj +++ b/pkgs/sdk/client/test/LaunchDarkly.ClientSdk.Tests/LaunchDarkly.ClientSdk.Tests.csproj @@ -8,6 +8,7 @@ $(TESTFRAMEWORK) LaunchDarkly.ClientSdk.Tests LaunchDarkly.Sdk.Client + true