Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuang authored and dhuang committed Aug 17, 2023
1 parent 55acfc8 commit c91c21f
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
echo "=========== Build log ==========="
echo "${status}"
echo "commitid=${GITHUB_SHA:0:7}" >> "$GITHUB_OUTPUT"
echo "=========== Build status ==========="
if [[ "${status}" = "FAILED" ]]; then
echo "${{ github.event.repository.name }} build failed"
echo "status=failed" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -87,17 +88,27 @@ jobs:
export TESTMO_TOKEN=${{ secrets.TESTMO_TEST_TOKEN }}
TESTMO_URL="https://neuralmagic.testmo.net"
todaytime=`date +%Y%m%d`
NAME="${{ github.event.repository.name }} ${{ inputs.build_type }} ${todaytime} ${{ needs.BUILD.outputs.commitid }} RunID${{ inputs.run_id }}"
name="${{ github.event.repository.name }} ${{ inputs.build_type }} ${todaytime} ${{ needs.BUILD.outputs.commitid }} RunID${{ inputs.run_id }}"
echo "========== Build info ==========="
echo "name: ${name}"
echo "status: ${{ needs.BUILD.outputs.status }}"
if [[ "${{ needs.BUILD.outputs.status }}" = "FAILED" ]]; then
echo "${{ github.event.repository.name }} build failed"
echo "<status>failed</status>" > result.xml
else
echo "<status>success</status>" > result.xml
echo "${{ github.event.repository.name }} build success"
fi
cat result.xml
echo "========== Report to testmo ==========="
echo "testmo command:"
echo "testmo automation:run:submit \"
echo " --instance "${TESTMO_URL} \"
echo " --project-id ${{ inputs.testmo_project_id }} \"
echo " --name "${name} \"
echo " --source "${{ github.event.repository.name }} \"
echo " --results result.xml"
testmo automation:run:submit \
--instance "${TESTMO_URL}" \
--project-id ${{ inputs.testmo_project_id }}
--name "${NAME}" \
--project-id ${{ inputs.testmo_project_id }} \
--name "${name}" \
--source "${{ github.event.repository.name }}" \
--results result.xml

0 comments on commit c91c21f

Please sign in to comment.