-
Notifications
You must be signed in to change notification settings - Fork 649
68 lines (59 loc) · 1.62 KB
/
ci_schedule.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# 定时巡检
name: CI_Schedule
on:
schedule:
# 北京时间 09:00
- cron: '0 1 * * *'
jobs:
ci:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: install
run: |
yarn install
- name: lint
run: |
npm run lint
env:
CI: true
- name: build
run: |
npm run build
env:
CI: true
- name: test
run: |
npm run test
env:
CI: true
# 发布失败通知内部开发群
- name: CI failure notify
if: ${{ failure() }}
uses: zcong1993/actions-ding@master
with:
dingToken: ${{ secrets.DING_TALK_ACCESS_TOKEN }}
ignoreError: true
body: |
{
"msgtype": "link",
"link": {
"title": "😳 F2 CI 巡检失败",
"text": "🔗 请点击链接查看具体原因",
"messageUrl": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"picUrl": "https://gw.alipayobjects.com/zos/finxbff/compress-tinypng/ea88c724-38fb-42aa-8055-0e08155368b9.png"
}
}
# 保存巡检失败的 diff 图片
- name: save diff snapshot
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: diff snapshot
path: |
packages/**/__image_snapshots__/__diff_output__/*.png
!**/node_modules/**