Skip to content

Commit 4f54a31

Browse files
feat: group uipcli outputs (#21)
Add groups separating uipcli outputs for test executions by process. This adds collapsible sections containing the output on project level making it easier to read.
1 parent ee046ff commit 4f54a31

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

action.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,19 @@ runs:
121121
122122
while IFS= read -r projectFile; do
123123
projectInfo=$(cat "$projectFile" | jq '.')
124+
projectName=$(echo "$projectInfo" | jq -r '.name')
124125
targetFramework=$(echo "$projectInfo" | jq -r '.targetFramework')
125126
fileInfoCollection=$(echo "$projectInfo" | jq -r '.designOptions.fileInfoCollection')
126-
127+
128+
echo "::group::uipcli output for testing project $projectName"
127129
if [ "$(echo "$fileInfoCollection" | jq length)" -gt 0 ]; then
128130
publishableTests=$(echo "$fileInfoCollection" | jq '[.[] | select(.editingStatus == "Publishable")] | length')
129131
if [ "$publishableTests" -gt 0 ]; then
130132
repositoryContainsTests=1
131133
echo "containsPublishableTestCases=true" >> $GITHUB_OUTPUT
132-
testResultFilePath="$testResultsFolder/$(echo "$projectInfo" | jq -r '.name')-testresults.json"
134+
testResultFilePath="$testResultsFolder/$(echo "$projectInfo-testresults.json"
133135
134-
echo "Running tests for project $(echo "$projectInfo" | jq -r '.name')"
136+
echo "Running tests for project $projectName"
135137
uipcli test run "${{ inputs.orchestratorUrl }}" "${{ inputs.orchestratorTenant }}" \
136138
--project-path "$projectFile" \
137139
--accountForApp "${{ inputs.orchestratorLogicalName }}" \
@@ -147,13 +149,14 @@ runs:
147149
testsFailed=1
148150
fi
149151
else
150-
echo "$(echo "$projectInfo" | jq -r '.name') contains no test cases set as publishable. Testing skipped."
151-
testResults+="\n- :warning: **$(echo "$projectInfo" | jq -r '.name') contains no test cases set as publishable. Testing skipped.**\n"
152+
echo "$projectName contains no test cases set as publishable. Testing skipped."
153+
testResults+="\n- :warning: **$projectName contains no test cases set as publishable. Testing skipped.**\n"
152154
fi
153155
else
154-
echo "$(echo "$projectInfo" | jq -r '.name') contains no test cases. Testing skipped."
155-
testResults+="\n- :warning: **$(echo "$projectInfo" | jq -r '.name') contains no test cases. Testing skipped.**\n"
156+
echo "$(echo "$projectName contains no test cases. Testing skipped."
157+
testResults+="\n- :warning: **$projectName contains no test cases. Testing skipped.**\n"
156158
fi
159+
echo "::endgroup::"
157160
done <<< "$projectJsonFiles"
158161
159162

0 commit comments

Comments
 (0)