9090
9191 foreach ($target_framework in ConvertFrom-Json "${{steps.test-args.outputs.target_frameworks}}") {
9292 $trxFileName = "${{inputs.os}}-${{inputs.architecture}}-${{inputs.runtime-type}}-${{inputs.build_configuration}}-$target_framework.trx"
93- & ${{(inputs.runtime-type == 'mono' && '"$mono"') || ''}} "$vstest" "HarmonyTests/bin/${{inputs.build_configuration}}/$target_framework/HarmonyTests.dll" --framework:$target_framework --logger:"trx;LogFileName=TestResults/$trxFileName" --logger:"console;verbosity=normal" --blame -- ${{steps.test-args.outputs.run_settings_args}}
93+ & ${{(inputs.runtime-type == 'mono' && '"$mono"') || ''}} "$vstest" "HarmonyTests/bin/${{inputs.build_configuration}}/$target_framework/HarmonyTests.dll" --framework:$target_framework --logger:"trx;LogFileName=../ TestResults/$trxFileName" --logger:"console;verbosity=normal" --blame -- ${{steps.test-args.outputs.run_settings_args}}
9494 }
9595 shell : pwsh
9696
9999 run : |
100100 foreach ($target_framework in ConvertFrom-Json "${{steps.test-args.outputs.target_frameworks}}") {
101101 $trxFileName = "${{inputs.os}}-${{inputs.architecture}}-${{inputs.runtime-type}}-${{inputs.build_configuration}}-$target_framework.trx"
102- dotnet test "HarmonyTests/bin/${{inputs.build_configuration}}/$target_framework/HarmonyTests.dll" -f $target_framework --logger:"trx;LogFileName=TestResults/$trxFileName" --logger:"console;verbosity=normal" -- ${{steps.test-args.outputs.run_settings_args}}
102+ dotnet test "HarmonyTests/bin/${{inputs.build_configuration}}/$target_framework/HarmonyTests.dll" -f $target_framework --logger:"trx;LogFileName=../ TestResults/$trxFileName" --logger:"console;verbosity=normal" -- ${{steps.test-args.outputs.run_settings_args}}
103103 }
104104 shell : pwsh
105105
@@ -118,31 +118,10 @@ runs:
118118 }
119119 foreach ($target_framework in ConvertFrom-Json "${{steps.test-args.outputs.target_frameworks}}") {
120120 $trxFileName = "${{inputs.os}}-${{inputs.architecture}}-${{inputs.runtime-type}}-${{inputs.build_configuration}}-$target_framework.trx"
121- & $dotnet test "HarmonyTests/bin/${{inputs.build_configuration}}/$target_framework/HarmonyTests.dll" -f $target_framework --logger:"trx;LogFileName=TestResults/$trxFileName" --logger:"console;verbosity=normal" -- ${{steps.test-args.outputs.run_settings_args}}
121+ & $dotnet test "HarmonyTests/bin/${{inputs.build_configuration}}/$target_framework/HarmonyTests.dll" -f $target_framework --logger:"trx;LogFileName=../ TestResults/$trxFileName" --logger:"console;verbosity=normal" -- ${{steps.test-args.outputs.run_settings_args}}
122122 }
123123 shell : pwsh
124124
125- # Copy any TRX files that might have ended up in a nested directory
126- - name : Fix any nested TRX files (Windows)
127- if : runner.os == 'Windows'
128- run : |
129- $nestedDirs = Get-ChildItem -Path "TestResults" -Directory
130- foreach ($dir in $nestedDirs) {
131- $trxFiles = Get-ChildItem -Path $dir.FullName -Filter "*.trx" -File
132- foreach ($file in $trxFiles) {
133- Copy-Item -Path $file.FullName -Destination "TestResults\" -Force
134- }
135- }
136- shell : pwsh
137- continue-on-error : true
138-
139- - name : Fix any nested TRX files (Unix)
140- if : runner.os != 'Windows'
141- run : |
142- find TestResults -mindepth 2 -name "*.trx" -type f -exec cp {} TestResults/ \;
143- shell : bash
144- continue-on-error : true
145-
146125 # Debug step for Windows
147126 - name : List TRX files (Windows)
148127 if : runner.os == 'Windows'
@@ -169,14 +148,6 @@ runs:
169148 fi
170149 shell : bash
171150
172- # Ensure permissions are correct on Unix systems
173- - name : Set permissions (Unix)
174- if : runner.os != 'Windows'
175- run : |
176- chmod -R 755 TestResults
177- shell : bash
178- continue-on-error : true
179-
180151 - name : Upload Test Result
181152 uses : ./.github/actions/test-upload-result
182153 if : ${{(inputs.upload_tests == 'true') && (always() || failure())}}
0 commit comments