diff --git a/.github/workflows/dotnet-test.yml b/.github/workflows/dotnet-test.yml index 20c54ad5..dfae7277 100644 --- a/.github/workflows/dotnet-test.yml +++ b/.github/workflows/dotnet-test.yml @@ -10,20 +10,6 @@ concurrency: cancel-in-progress: true jobs: - build: - name: Building - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 7.x - - - name: Execute Tests - run: dotnet build --configuration Release - test: name: Testing runs-on: ubuntu-latest @@ -39,4 +25,4 @@ jobs: uses: helm/kind-action@v1.8.0 - name: Execute Tests - run: dotnet test + run: dotnet test --configuration Release diff --git a/test/KubeOps.Operator.Test/MlcProvider.cs b/test/KubeOps.Operator.Test/MlcProvider.cs index de282d99..a81c17ca 100644 --- a/test/KubeOps.Operator.Test/MlcProvider.cs +++ b/test/KubeOps.Operator.Test/MlcProvider.cs @@ -21,10 +21,17 @@ static MlcProvider() public async Task InitializeAsync() { + var assemblyConfigurationAttribute = + typeof(MlcProvider).Assembly.GetCustomAttribute(); + var buildConfigurationName = assemblyConfigurationAttribute?.Configuration ?? "Debug"; + try { await Semaphore.WaitAsync(); - using var workspace = MSBuildWorkspace.Create(); + using var workspace = MSBuildWorkspace.Create(new Dictionary + { + { "Configuration", buildConfigurationName }, + }); workspace.SkipUnrecognizedProjects = true; workspace.LoadMetadataForReferencedProjects = true; var project = await workspace.OpenProjectAsync("../../../KubeOps.Operator.Test.csproj"); diff --git a/test/KubeOps.Transpiler.Test/MlcProvider.cs b/test/KubeOps.Transpiler.Test/MlcProvider.cs index cc6f0f97..cdee1aa2 100644 --- a/test/KubeOps.Transpiler.Test/MlcProvider.cs +++ b/test/KubeOps.Transpiler.Test/MlcProvider.cs @@ -17,7 +17,15 @@ static MlcProvider() public async Task InitializeAsync() { - using var workspace = MSBuildWorkspace.Create(); + var assemblyConfigurationAttribute = + typeof(MlcProvider).Assembly.GetCustomAttribute(); + var buildConfigurationName = assemblyConfigurationAttribute?.Configuration ?? "Debug"; + + using var workspace = MSBuildWorkspace.Create(new Dictionary + { + { "Configuration", buildConfigurationName }, + }); + workspace.SkipUnrecognizedProjects = true; workspace.LoadMetadataForReferencedProjects = true; var project = await workspace.OpenProjectAsync("../../../KubeOps.Transpiler.Test.csproj"); diff --git a/toc.yml b/toc.yml index a804a022..4c4ba6f4 100644 --- a/toc.yml +++ b/toc.yml @@ -10,10 +10,10 @@ href: src/KubeOps.Cli/README.md - name: KubeOps Generator href: src/KubeOps.Generator/README.md - - name: KubeOps Operator - href: src/KubeOps.Operator/README.md - name: KubeOps Kubernetes Client href: src/KubeOps.KubernetesClient/README.md + - name: KubeOps Operator + href: src/KubeOps.Operator/README.md - name: KubeOps Operator Web href: src/KubeOps.Operator.Web/README.md - name: KubeOps Transpiler