Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit 5c467fb

Browse files
authored
Merge pull request #32 from storyprotocol/update-notification
Update notification
2 parents 1763cdf + 2fcf2cf commit 5c467fb

2 files changed

Lines changed: 39 additions & 56 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -50,35 +50,14 @@ jobs:
5050
echo API_KEY=${{ secrets.API_KEY }} >> .env
5151
test_env=sepolia npx playwright test
5252
53-
- name: Push Slack Notification
54-
uses: slackapi/slack-github-action@v1.25.0
53+
- name: Deploy report to GitHub Pages
54+
if: always()
55+
uses: peaceiris/actions-gh-pages@v4
5556
with:
56-
channel-id: ${{ secrets.SLACK_CHANNEL_ID_API_INTEGRATION_TESTS }}
57-
payload: |
58-
{
59-
"text": "${{ github.repository }}: API Integration Tests have been completed. Check the results at github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
60-
"blocks": [
61-
{ "type": "divider" },
62-
{
63-
"type": "image",
64-
"title": {
65-
"type": "plain_text",
66-
"text": "Playwright Test Results"
67-
},
68-
"image_url": "http://www.quickmeme.com/img/b9/b9848df257b95cd39585368475a4b4e4a3a8c774f7390226daecb79b912087ad.jpg",
69-
"alt_text": "Playwright Test Results"
70-
},
71-
{
72-
"type": "section",
73-
"text": {
74-
"type": "mrkdwn",
75-
"text":"${{ github.repository }}: API Integration Tests have been completed. \nCheck the results at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
76-
}
77-
}
78-
]
79-
}
80-
env:
81-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
57+
github_token: ${{ secrets.GITHUB_TOKEN }}
58+
publish_dir: ./playwright-report-sepolia
59+
publish_branch: gh-pages
60+
keep_files: true
8261

8362
- name: Upload Test Results
8463
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
@@ -87,3 +66,15 @@ jobs:
8766
name: sepolia-test-reports
8867
path: |
8968
./playwright-report-sepolia/index.html
69+
70+
push-slack-notification:
71+
name: Push Slack Notification
72+
uses: storyprotocol/gha-workflows/.github/workflows/reusable-slack-notifs.yml@main
73+
with:
74+
short-desc: "${{ github.repository }}: API Integration Tests have been completed. Check the results at https://storyprotocol.github.io/api-integration-tests/index.html"
75+
title: "API Integration Test Results"
76+
img-url: "http://www.quickmeme.com/img/b9/b9848df257b95cd39585368475a4b4e4a3a8c774f7390226daecb79b912087ad.jpg"
77+
img-alt-text: "API Integration Test Results"
78+
secrets:
79+
channel-name: ${{ secrets.SLACK_CHANNEL_ID_API_INTEGRATION_TESTS }}
80+
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}

.github/workflows/prod-test.yml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,39 +39,31 @@ jobs:
3939
echo API_KEY=${{ secrets.API_KEY_PROD }} >> .env
4040
test_env=sepolia npx playwright test
4141
42-
- name: Push Slack Notification
43-
uses: slackapi/slack-github-action@v1.25.0
42+
- name: Deploy report to GitHub Pages
43+
if: always()
44+
uses: peaceiris/actions-gh-pages@v4
4445
with:
45-
channel-id: ${{ secrets.SLACK_CHANNEL_ID_API_INTEGRATION_TESTS }}
46-
payload: |
47-
{
48-
"text": "${{ github.repository }}: API Testing for Prod Endpoint have been completed. Check the results at github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
49-
"blocks": [
50-
{ "type": "divider" },
51-
{
52-
"type": "image",
53-
"title": {
54-
"type": "plain_text",
55-
"text": "Playwright Test Results"
56-
},
57-
"image_url": "http://www.quickmeme.com/img/b9/b9848df257b95cd39585368475a4b4e4a3a8c774f7390226daecb79b912087ad.jpg",
58-
"alt_text": "Playwright Test Results"
59-
},
60-
{
61-
"type": "section",
62-
"text": {
63-
"type": "mrkdwn",
64-
"text":"${{ github.repository }}: API Testing for Prod Endpoint have been completed. \nCheck the results at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
65-
}
66-
}
67-
]
68-
}
69-
env:
70-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
publish_dir: ./playwright-report-sepolia
48+
publish_branch: gh-pages
49+
keep_files: true
7150

7251
- name: Upload Test Results
7352
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
53+
# if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
7454
with:
7555
name: sepolia-test-reports
7656
path: |
7757
./playwright-report-sepolia/index.html
58+
59+
push-slack-notification:
60+
name: Push Slack Notification
61+
uses: storyprotocol/gha-workflows/.github/workflows/reusable-slack-notifs.yml@main
62+
with:
63+
short-desc: "${{ github.repository }}: API Integration Tests of Prod have been completed. Check the results at https://storyprotocol.github.io/api-integration-tests/index.html"
64+
title: "API Integration Test Results of Prod"
65+
img-url: "http://www.quickmeme.com/img/b9/b9848df257b95cd39585368475a4b4e4a3a8c774f7390226daecb79b912087ad.jpg"
66+
img-alt-text: "API Integration Test Results"
67+
secrets:
68+
channel-name: ${{ secrets.SLACK_CHANNEL_ID_API_INTEGRATION_TESTS }}
69+
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}

0 commit comments

Comments
 (0)