Show message in conf test results

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
ItalyPaleAle 2022-10-05 21:45:31 +00:00
parent 25020bf3d7
commit e06a7f4c9a
2 changed files with 38 additions and 2 deletions

View File

@ -390,7 +390,7 @@ jobs:
echo "totalPer=$totalPer" >> $GITHUB_ENV
echo "aboveThreshold=$aboveThreshold" >> $GITHUB_ENV
echo "totalFiles=$totalFiles" >> $GITHUB_ENV
done < ${{steps.download.outputs.download-path}}/$f
done < "${{steps.download.outputs.download-path}}/$f"
done
continue-on-error: true

View File

@ -496,4 +496,40 @@ jobs:
name: result_files
path: tmp/result_files
- name: Build
- name: Build message
run: |
BASEPATH="${{steps.testresults.outputs.download-path}}"
NL=$'\n'
TABLE=""
ls "$BASEPATH" | while read f; do
while read LINE; do
if [[ "$LINE" == "1" ]]; then
TABLE="$TABLE| $f | ✅ |$NL"
elif [[ "$LINE" == "0" ]]; then
TABLE="$TABLE| $f | ❌ |$NL"
else
TABLE="$TABLE| $f | 🤔 |$NL"
fi
done < "$BASEPATH/$f"
done
echo "TABLE=$TABLE" >> $GITHUB_ENV
- name: Replace PR comment
if: env.PR_NUMBER != ''
uses: artursouza/sticky-pull-request-comment@v2.2.0
with:
header: ${{ github.run_id }}
number: ${{ env.PR_NUMBER }}
GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }}
message: |
# Components conformance test
🔗 **[Link to Action run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})**
Commit ref: ${{ env.CHECKOUT_REF }}
## Result
| Component | Status |
| --- | --- |
${{ env.TABLE }}