Skip to content

Commit bb0c56b

Browse files
[GHA] Automatic trigger with Slack notification (#1)
* add an auto trigger on pr * add a slack message step
1 parent c810720 commit bb0c56b

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Auto run simple suite
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
run-simple-suite:
10+
timeout-minutes: 15
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '22'
20+
cache: 'yarn'
21+
22+
- name: Install dependencies
23+
run: yarn install
24+
25+
- name: Install Playwright browsers
26+
run: yarn playwright install chromium
27+
28+
- name: Run simple suite
29+
run: yarn playwright test --project=chromium --grep @smoke
30+
31+
- name: Upload test results
32+
if: ${{ !cancelled() }}
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: simple-suite-results-${{ github.run_id }}
36+
path: playwright-report/
37+
retention-days: 7
38+
39+
- name: Post to Slack
40+
env:
41+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
42+
run: |
43+
curl -X POST -H 'Content-type: application/json' \
44+
--data '{"text":"Simple suite results are ready"}' \
45+
$SLACK_WEBHOOK_URL

0 commit comments

Comments
 (0)