1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

feat(github regression): add link to github job (#1482)

* feat(regression): add github job link

Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
adiholden 2023-06-27 14:13:25 +03:00 committed by GitHub
parent cbe72e353d
commit aed01aa5e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,9 +66,8 @@ jobs:
- name: Send notification on failure
if: failure() || cancelled()
if: failure()
run: |
get_failed_tests() {
local report_file=$1
echo $(jq -r '.tests[] | select(.outcome == "failed") | .nodeid' "$report_file")
@ -85,8 +84,12 @@ jobs:
elif [ -f report.json ]; then
failed_tests=$(get_failed_tests report.json)
fi
job_link="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
message="Regression tests failed.\\n The commit is: ${{github.sha}}.\\n $failed_tests \\n Job Link: ${job_link}\\n"
curl -s \
-X POST \
-H 'Content-Type: application/json' \
'${{ secrets.GSPACES_BOT_DF_BUILD }}' \
-d "{\"text\": \"Regression tests failed.\\n The commit is ${{github.sha}}.\\n $failed_tests\"}"
-d '{"text": "'"${message}"'"}'