Skip to content

Commit

Permalink
Merge pull request #16 from storyprotocol/feat/add_slack_integration
Browse files Browse the repository at this point in the history
[feat] add slack integration
  • Loading branch information
LeoHChen authored Mar 30, 2024
2 parents 8783043 + 58f3199 commit 002d8b1
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Lint
run: pnpm eslint .
# Ensure you have a lint script in your package.json

- name: Run Tests
continue-on-error: true
run: |
Expand All @@ -53,6 +53,26 @@ jobs:
export API_KEY=${{ secrets.API_KEY }}
pnpm exec playwright test
- name: Push Slack Notification
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID_GITHUB_NOTIFICATION }}
payload: |
{
"text": "${{ github.repository }}: API Integration Tests have been completed. Check the results at github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text":"${{ github.repository }}: API Integration Tests have been completed. \nCheck the results at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

- name: Upload Test Results
uses: actions/upload-artifact@v2
# if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down

0 comments on commit 002d8b1

Please sign in to comment.