Skip to content

Commit a65d8e0

Browse files
authored
feat: add cron test ci (#159)
1 parent 216bdfa commit a65d8e0

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: CI
22

33
on:
4+
schedule:
5+
- cron: '0 0 * * *'
46
push:
57
branches: [main]
68
pull_request:
@@ -27,3 +29,29 @@ jobs:
2729
TEST_DATABEND_DSN: "databend://databend:databend@localhost:8000/default?sslmode=disable"
2830
run: |
2931
make integration
32+
33+
notify:
34+
if: failure()
35+
needs: [ test ]
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: Notify Dev Team
40+
uses: actions/github-script@v7
41+
env:
42+
WEBHOOK_URL: ${{ secrets.DEV_TEAM_WEBHOOK_URL }}
43+
with:
44+
script: |
45+
const body = {
46+
msg_type: 'text',
47+
content: {
48+
text: '⚠️ Databend JDBC Integration Tests Failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}',
49+
}
50+
}
51+
const response = await fetch(process.env.WEBHOOK_URL, {
52+
method: 'POST',
53+
body: JSON.stringify(body),
54+
headers: {'Content-Type': 'application/json'}
55+
});
56+
const result = await response.json();
57+
console.log(result);

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.envrc
2+
tmp
23
/dist
34
/CHANGELOG.md
45
/script/build

0 commit comments

Comments
 (0)