Skip to content

Commit

Permalink
[FAPI] Send google chat with FAPI test results
Browse files Browse the repository at this point in the history
  • Loading branch information
anjuchamantha committed Jan 3, 2024
1 parent 455d5c4 commit b4d21d4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/fapi-oidc-conformance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ on:
description: 'Send test results to email'
required: true
default: 'no'
send-chat:
description: 'Send test results to google chat'
required: true
default: 'yes'

jobs:
build:
Expand Down Expand Up @@ -254,4 +258,36 @@ jobs:
echo "Invalid parameter value. Skipped sending email"
echo "================================================================="
fi
- name: Send Chat message
if: always()
run: |
INPUT=${{github.event.inputs.send-chat}}
if [[ -z "${INPUT}" ]]; then
INPUT="yes"
fi
INPUT_TAG=${{github.event.inputs.tag}}
if [[ -z "${INPUT_TAG}" ]]; then
RESOURCE="built from latest source"
else
RESOURCE=${{github.event.inputs.tag}}
fi
SEND_CHAT=${INPUT^^}
if [ $SEND_CHAT == "YES" ]; then
echo "==========================="
echo "Sending Google Chat Message"
echo "==========================="
CONFORMANCE_SUITE_URL=https://localhost:8443
python3 ./product-is/oidc-conformance-tests/send_chat.py "$CONFORMANCE_SUITE_URL" "$GITHUB_RUN_NUMBER" "${{job.status}}" "${{github.repository}}" "${{github.run_id}}" "${{secrets.GOOGLE_CHAT_WEBHOOK_OIDC_TEST}}" "$RESOURCE"
elif [ $SEND_CHAT == "NO" ]; then
echo "========================================"
echo "Skipped Sending Google Chat Message"
echo "========================================"
else
echo "================================================================="
echo "Invalid parameter value. Skipped sending google chat message"
echo "================================================================="
fi
2 changes: 1 addition & 1 deletion oidc-fapi-conformance-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This folder contains the configuration files and scripts that can be used to aut
## Testing using GitHub actions

OIDC FAPI conformance test workflow can be used to for this purpose.
1. Go to Actions tab in your repository
1. Go to the Actions tab in the wso2/product-is github repository
2. Click on FAPI OIDC Conformance Test workflow
3. Click on Run workflow
4. You need to provide the product-is release tag version you want to test (by default, it builds the latest IS by source)
Expand Down

0 comments on commit b4d21d4

Please sign in to comment.