Skip to content

.Net: Fix CI pipeline for Windows runner #6304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 17, 2024
Merged
26 changes: 13 additions & 13 deletions .github/workflows/dotnet-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,40 +52,40 @@ jobs:
fail-fast: false
matrix:
include:
- { dotnet: "8.0-jammy", os: "ubuntu", configuration: Release }
- {
dotnet: "8.0",
os: "windows",
configuration: Debug,
os: "ubuntu-latest",
configuration: Release,
integration-tests: true,
}
- { dotnet: "8.0", os: "windows", configuration: Release }

runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/dotnet/sdk:${{ matrix.dotnet }}
env:
NUGET_CERT_REVOCATION_MODE: offline
GITHUB_ACTIONS: "true"
- { dotnet: "8.0", os: "windows-latest", configuration: Debug }
- { dotnet: "8.0", os: "windows-latest", configuration: Release }

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Setup dotnet ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Build dotnet solutions
shell: bash
run: |
export SOLUTIONS=$(find ./dotnet/ -type f -name "*.sln" | tr '\n' ' ')
for solution in $SOLUTIONS; do
dotnet build -c ${{ matrix.configuration }} /warnaserror $solution
dotnet build $solution -c ${{ matrix.configuration }} --warnaserror
done

- name: Run Unit Tests
shell: bash
run: |
export UT_PROJECTS=$(find ./dotnet -type f -name "*.UnitTests.csproj" | grep -v -E "(Experimental.Orchestration.Flow.UnitTests.csproj|Experimental.Assistants.UnitTests.csproj)" | tr '\n' ' ')
for project in $UT_PROJECTS; do
dotnet test -c ${{ matrix.configuration }} $project --no-build -v Normal --logger trx --collect:"XPlat Code Coverage" --results-directory:"TestResults/Coverage/" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.ExcludeByAttribute=ObsoleteAttribute,GeneratedCodeAttribute,CompilerGeneratedAttribute,ExcludeFromCodeCoverageAttribute
done

- name: Run Integration Tests
shell: bash
if: github.event_name != 'pull_request' && matrix.integration-tests
run: |
export INTEGRATION_TEST_PROJECTS=$(find ./dotnet -type f -name "*IntegrationTests.csproj" | grep -v "Experimental.Orchestration.Flow.IntegrationTests.csproj" | tr '\n' ' ')
Expand Down
2 changes: 0 additions & 2 deletions dotnet/samples/GettingStarted/Step8_Pipelining.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public static class KernelFunctionCombinators
/// <param name="kernel">The kernel to use for the operations.</param>
/// <param name="arguments">The arguments.</param>
/// <param name="cancellationToken">The cancellation token to monitor for a cancellation request.</param>
/// <returns></returns>
public static Task<FunctionResult> InvokePipelineAsync(
IEnumerable<KernelFunction> functions, Kernel kernel, KernelArguments arguments, CancellationToken cancellationToken) =>
Pipe(functions).InvokeAsync(kernel, arguments, cancellationToken);
Expand All @@ -89,7 +88,6 @@ public static Task<FunctionResult> InvokePipelineAsync(
/// <param name="kernel">The kernel to use for the operations.</param>
/// <param name="arguments">The arguments.</param>
/// <param name="cancellationToken">The cancellation token to monitor for a cancellation request.</param>
/// <returns></returns>
public static Task<FunctionResult> InvokePipelineAsync(
IEnumerable<(KernelFunction Function, string OutputVariable)> functions, Kernel kernel, KernelArguments arguments, CancellationToken cancellationToken) =>
Pipe(functions).InvokeAsync(kernel, arguments, cancellationToken);
Expand Down
Loading