Skip to content

Commit b2bbbea

Browse files
authored
Improve GHA presentation (dotnet#9239)
* Remove "Aspire." prefix from all tests to shorten names * Add "w/l" (Windows/Linux) label prefix for display purposes
1 parent db77339 commit b2bbbea

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

.github/workflows/tests-outerloop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
if: matrix.tests.os == 'ubuntu-latest'
6262
run: ./dotnet.sh dev-certs https --trust
6363

64-
- name: Test ${{ matrix.tests.project }}
64+
- name: Test ${{ matrix.tests.label }}
6565
run: |
6666
${{ matrix.tests.command }}
6767

.github/workflows/tests-runner.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
sudo apt-get update
121121
sudo apt-get install -y azure-functions-core-tools-4
122122
123-
- name: Test ${{ matrix.tests.project }}
123+
- name: Test ${{ matrix.tests.label }}
124124
env:
125125
CI: false
126126
run: |
@@ -184,7 +184,7 @@ jobs:
184184
sudo apt-get update
185185
sudo apt-get install -y azure-functions-core-tools-4
186186
187-
- name: Test ${{ matrix.tests.project }}
187+
- name: Test ${{ matrix.tests.label }}
188188
env:
189189
CI: false
190190
BUILT_NUGETS_PATH: ${{ github.workspace }}/artifacts/packages/Release/Shipping

eng/QuarantinedTestRunsheetBuilder/QuarantinedTestRunsheetBuilder.targets

+3-3
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
So, instead of using "%(TestToRun.ResultsFilePathWithoutExtension)" (which looks something like "Aspire.Cli.Tests_net8.0_x64")
124124
we use the project name (which looks something like "Aspire.Cli.Tests").
125125
-->
126-
<_TestRunsheet>$(MSBuildProjectName)</_TestRunsheet>
126+
<_TestRunsheet>$([System.String]::Copy('$(MSBuildProjectName)').Replace('Aspire.', ''))</_TestRunsheet>
127127
<_TestBinLog>$([MSBuild]::NormalizePath($(ArtifactsLogDir), '$(_TestRunsheet).binlog'))</_TestBinLog>
128128

129129
<_RelativeTestProjectPath>$([System.String]::Copy('$(MSBuildProjectFullPath)').Replace('$(RepoRoot)', '%24(pwd)/'))</_RelativeTestProjectPath>
@@ -142,8 +142,8 @@
142142
<!-- Replace \ with /, and then escape " with \", so we have a compliant JSON -->
143143
<_TestCommand>$([System.String]::Copy($(_TestCommand)).Replace("\", "/").Replace('&quot;', '\&quot;'))</_TestCommand>
144144

145-
<_TestRunsheetWindows>{ "project": "$(_TestRunsheet)", "os": "windows-latest", "command": "./eng/build.ps1 $(_TestCommand)" }</_TestRunsheetWindows>
146-
<_TestRunsheetLinux>{ "project": "$(_TestRunsheet)", "os": "ubuntu-latest", "command": "./eng/build.sh $(_TestCommand)" }</_TestRunsheetLinux>
145+
<_TestRunsheetWindows>{ "label": "w: $(_TestRunsheet)", "project": "$(_TestRunsheet)", "os": "windows-latest", "command": "./eng/build.ps1 $(_TestCommand)" }</_TestRunsheetWindows>
146+
<_TestRunsheetLinux>{ "label": "l: $(_TestRunsheet)", "project": "$(_TestRunsheet)", "os": "ubuntu-latest", "command": "./eng/build.sh $(_TestCommand)" }</_TestRunsheetLinux>
147147
</PropertyGroup>
148148

149149
<WriteLinesToFile

eng/TestRunsheetBuilder/TestRunsheetBuilder.targets

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
So, instead of using "%(TestToRun.ResultsFilePathWithoutExtension)" (which looks something like "Aspire.Cli.Tests_net8.0_x64")
5151
we use the project name (which looks something like "Aspire.Cli.Tests").
5252
-->
53-
<_TestRunsheet>$(MSBuildProjectName)</_TestRunsheet>
54-
<_TestRunsheetFileNameWindows>$(ArtifactsTmpDir)\$(_TestRunsheet).win.runsheet.json</_TestRunsheetFileNameWindows>
55-
<_TestRunsheetFileNameLinux>$(ArtifactsTmpDir)\$(_TestRunsheet).linux.runsheet.json</_TestRunsheetFileNameLinux>
53+
<_TestRunsheet>$([System.String]::Copy('$(MSBuildProjectName)').Replace('Aspire.', ''))</_TestRunsheet>
54+
<_TestRunsheetFileNameWindows>$(ArtifactsTmpDir)/$(_TestRunsheet).win.runsheet.json</_TestRunsheetFileNameWindows>
55+
<_TestRunsheetFileNameLinux>$(ArtifactsTmpDir)/$(_TestRunsheet).linux.runsheet.json</_TestRunsheetFileNameLinux>
5656

5757
<_TestBinLog>$([MSBuild]::NormalizePath($(ArtifactsLogDir), '$(_TestRunsheet).binlog'))</_TestBinLog>
5858

@@ -70,8 +70,8 @@
7070
<_PreCommand>$([System.String]::Copy($(_PreCommand)).Replace("\", "/").Replace('&quot;', '\&quot;'))</_PreCommand>
7171
<_TestCommand>$([System.String]::Copy($(_TestCommand)).Replace("\", "/").Replace('&quot;', '\&quot;'))</_TestCommand>
7272

73-
<_TestRunsheetWindows>{ "project": "$(_TestRunsheet)", "os": "windows-latest", "command": "./eng/build.ps1 $(_TestCommand)" }</_TestRunsheetWindows>
74-
<_TestRunsheetLinux>{ "project": "$(_TestRunsheet)", "os": "ubuntu-latest", "command": "$(_PreCommand)./eng/build.sh $(_TestCommand)" }</_TestRunsheetLinux>
73+
<_TestRunsheetWindows>{ "label": "w: $(_TestRunsheet)", "project": "$(_TestRunsheet)", "os": "windows-latest", "command": "./eng/build.ps1 $(_TestCommand)" }</_TestRunsheetWindows>
74+
<_TestRunsheetLinux>{ "label": "l: $(_TestRunsheet)", "project": "$(_TestRunsheet)", "os": "ubuntu-latest", "command": "$(_PreCommand)./eng/build.sh $(_TestCommand)" }</_TestRunsheetLinux>
7575
</PropertyGroup>
7676

7777
<ItemGroup>

0 commit comments

Comments
 (0)