diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cd3efc60..c09495fc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,13 +8,16 @@ jobs: build_csharp: strategy: matrix: + os: [ubuntu-latest, windows-latest] + target-framework: [net6.0] + grpc-web: [false, true] include: - - os: ubuntu-latest - target-framework: net6.0 - os: windows-latest - target-framework: net6.0 + target-framework: net462 + grpc-web: false - os: windows-latest target-framework: net462 + grpc-web: true runs-on: ${{ matrix.os }} env: TEST_AUTH_TOKEN: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }} @@ -47,7 +50,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Build - run: dotnet build + run: dotnet build ${{ matrix.grpc-web && '-p:DefineConstants=USE_GRPC_WEB' || '' }} - name: Unit Test run: dotnet test --logger "console;verbosity=detailed" -f ${{ matrix.target-framework }} tests/Unit/Momento.Sdk.Tests diff --git a/.github/workflows/on-push-to-main-branch.yaml b/.github/workflows/on-push-to-main-branch.yaml index 1ee763cd..bca2453b 100644 --- a/.github/workflows/on-push-to-main-branch.yaml +++ b/.github/workflows/on-push-to-main-branch.yaml @@ -8,11 +8,16 @@ jobs: build_csharp: strategy: matrix: + os: [ubuntu-latest, windows-latest] + target-framework: [net6.0] + grpc-web: [false, true] include: - - os: ubuntu-latest - target-framework: net6.0 - os: windows-latest target-framework: net462 + grpc-web: false + - os: windows-latest + target-framework: net462 + grpc-web: true runs-on: ${{ matrix.os }} env: TEST_AUTH_TOKEN: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }} @@ -32,7 +37,7 @@ jobs: dotnet-version: "6.0.x" - name: Build - run: dotnet build + run: dotnet build ${{ matrix.grpc-web && '-p:DefineConstants=USE_GRPC_WEB' || '' }} - name: Unit Test run: dotnet test -f ${{ matrix.target-framework }} tests/Unit/Momento.Sdk.Tests diff --git a/src/Momento.Sdk/Momento.Sdk.csproj b/src/Momento.Sdk/Momento.Sdk.csproj index 4aea7550..53553cb8 100644 --- a/src/Momento.Sdk/Momento.Sdk.csproj +++ b/src/Momento.Sdk/Momento.Sdk.csproj @@ -30,13 +30,6 @@ https://github.com/momentohq/client-sdk-dotnet - - - USE_GRPC_WEB - - @@ -66,7 +59,7 @@ - +