Skip to content

Commit 54dc22e

Browse files
committed
Fix outerloop issues
1. Take build agent OS in account when running tests Addresses #8498 (comment) 2. Read trx from correct location Resolves #8683
1 parent fd413eb commit 54dc22e

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/workflows/tests-outerloop.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
if: always()
9494
shell: pwsh
9595
run: |
96-
$logDirectory = "${{ github.workspace }}/artifacts/log/**/TestLogs"
96+
$logDirectory = "${{ github.workspace }}/artifacts/TestResults"
9797
$trxFiles = Get-ChildItem -Path $logDirectory -Filter *.trx -Recurse
9898
9999
$testResults = @() # Initialize an array to store test results
@@ -172,4 +172,5 @@ jobs:
172172
path: |
173173
${{ github.workspace }}/artifacts/log/*/*.binlog
174174
${{ github.workspace }}/artifacts/log/*/TestLogs/**
175+
${{ github.workspace }}/artifacts/log/TestResults/*/*.trx
175176
retention-days: 5

eng/Testing.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
<SkipTests>true</SkipTests>
5151

5252
<!-- Only run tests if the build is running on GitHub Actions -->
53-
<SkipTests Condition=" '$(IsGitHubActionsRunner)' == 'true' and '$(RunOnGithubActions)' == 'true' ">false</SkipTests>
53+
<SkipTests Condition=" '$(IsGitHubActionsRunner)' == 'true' and '$(BuildOs)' == 'windows' and '$(RunOnGithubActionsWindows)' == 'true' ">false</SkipTests>
54+
<SkipTests Condition=" '$(IsGitHubActionsRunner)' == 'true' and '$(BuildOs)' != 'windows' and '$(RunOnGithubActionsLinux)' == 'true' ">false</SkipTests>
5455

5556
<!-- Only run tests if the build is running on Helix infra -->
5657
<SkipTests Condition=" '$(IsAzdoHelixRunner)' == 'true' and '$(RunOnAzdoHelix)' == 'true' ">false</SkipTests>

tests/Aspire.Components.Common.Tests/Aspire.Components.Common.Tests.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
<PropertyGroup>
44
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
5+
6+
<!--
7+
Whilst this looks like a test project, it is not... https://github.com/dotnet/aspire/pull/8498/files#r2029349258
8+
-->
9+
<IsTestUtilityProject>true</IsTestUtilityProject>
10+
<SkipTests>true</SkipTests>
11+
<DeployOutsideOfRepoSupportFiles>false</DeployOutsideOfRepoSupportFiles>
12+
513
<!-- https://learn.microsoft.com/dotnet/core/testing/microsoft-testing-platform-exit-codes -->
614
<!-- Exit code 8 is "zero tests ran" -->
715
<!-- Currently, none of the tests in this project run in CI. All are ignored -->

0 commit comments

Comments
 (0)