forked from 0xPolygon/polygon-edge
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Deploy Network * Add Permissions * Minor changes * Concurrency change * Destroy Network * Minor changes * Minor changes * Fix commit sha * Minor changes * Add Tests * Disable Tests temporarily * Nightly Build * Minor fixes * Big changes * Minor changes * Minor changes * Minor changes * Notification fixes * Notification changes * Minor changes * Permissions fixes * Minor changes * Notification changes * Minor changes
- Loading branch information
Showing
3 changed files
with
122 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
--- | ||
name: Notification - Tests | ||
on: # yamllint disable-line rule:truthy | ||
workflow_call: | ||
inputs: | ||
unit_test_output: | ||
description: Unit Tests output | ||
type: string | ||
required: true | ||
e2e_polybft_test_output: | ||
description: E2E PolyBFT Tests output | ||
type: string | ||
required: true | ||
e2e_legacy_test_output: | ||
description: E2E Legacy Tests output | ||
type: string | ||
required: true | ||
property_polybft_test_output: | ||
description: Property PolyBFT Tests output | ||
type: string | ||
required: true | ||
fuzz_test_output: | ||
description: Fuzz Tests output | ||
type: string | ||
required: true | ||
secrets: | ||
SLACK_WEBHOOK_URL: | ||
required: true | ||
|
||
jobs: | ||
notification: | ||
name: Notification | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Notify Slack | ||
uses: slackapi/slack-github-action@v1.23.0 | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | ||
green_color: '#03C03C' | ||
red_color: '#E60012' | ||
succeed_bnt: 'primary' | ||
failed_bnt: 'danger' | ||
with: | ||
payload: | | ||
{ | ||
"attachments": [ | ||
{ | ||
"color": "${{ inputs.unit_test_output == '' && inputs.fuzz_test_output == '' && inputs.e2e_legacy_test_output == '' && inputs.e2e_polybft_test_output == '' && inputs.property_polybft_test_output == '' && env.green_color || env.red_color }}", | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "Tests" | ||
} | ||
}, | ||
{ | ||
"type": "context", | ||
"elements": [ | ||
{ | ||
"type": "mrkdwn", | ||
"text": "Commit: *${{ github.sha }}*" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "context", | ||
"elements": [ | ||
{ | ||
"type": "mrkdwn", | ||
"text": "Triggered by: *${{ github.triggering_actor }}*" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "actions", | ||
"elements": [ | ||
{ | ||
"type": "button", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "Workflow Run" | ||
}, | ||
"style": "${{ inputs.unit_test_output == '' && inputs.fuzz_test_output == '' && inputs.e2e_legacy_test_output == '' && inputs.e2e_polybft_test_output == '' && inputs.property_polybft_test_output == '' && env.succeed_bnt || env.failed_bnt }}", | ||
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
}, | ||
{ | ||
"color": "${{ inputs.unit_test_output == '' && inputs.fuzz_test_output == '' && inputs.e2e_legacy_test_output == '' && inputs.e2e_polybft_test_output == '' && inputs.property_polybft_test_output == '' && env.green_color || env.red_color }}", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*Tests*\n${{ inputs.unit_test_output == '' && 'Unit' || '~Unit~' }}, ${{ inputs.fuzz_test_output == '' && 'Fuzz' || '~Fuzz~' }},\n${{ inputs.e2e_legacy_test_output == '' && 'E2E Legacy' || '~E2E Legacy~' }}, ${{ inputs.e2e_polybft_test_output == '' && 'E2E PolyBFT' || '~E2E PolyBFT~' }},\n${{ inputs.property_polybft_test_output == '' && 'Property PolyBFT' || '~Property PolyBFT~' }}" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters