File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
.github/actions/project-build Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,23 @@ Get-ChildItem -Path $testsFolderPath -Directory -Recurse `
2222| ForEach-Object {
2323 $testsProjectName = $_.Name
2424 $testsProjectPath = Join-Path - Path $testsFolderPath - ChildPath $testsProjectName
25- Write-Output " Tests project found: $testsProjectPath . Executing a command: $commandToExecute "
26- bash - c " PROJECT_PATH=$testsProjectPath && $commandToExecute "
27- if ($LASTEXITCODE -ne 0 ) {
28- $global :exitCode = $LASTEXITCODE
25+ Write-Host " Tests project found: $testsProjectPath . Executing a command: $commandToExecute "
26+ try {
27+ bash - c " PROJECT_PATH=$testsProjectPath && $commandToExecute "
28+ if ($LASTEXITCODE -ne 0 ) {
29+ Write-Host " Command failed with exit code $LASTEXITCODE "
30+ $global :exitCode = $LASTEXITCODE
31+ }
2932 }
33+ catch {
34+ Write-Host " Exception while running command in: $testsProjectPath "
35+ $global :exitCode = 1
36+ }
37+ }
38+
39+ if ($global :exitCode -ne 0 ) {
40+ Write-Host " `n One or more test commands failed."
41+ exit $global :exitCode
42+ } else {
43+ Write-Host " `n All test projects executed successfully."
3044}
You can’t perform that action at this time.
0 commit comments