-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (113 loc) · 3.47 KB
/
build.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: XTDB CI
run-name: XTDB CI
on:
push:
branches-ignore:
- docs-live
- docker-latest
jobs:
test:
name: Test
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Setup Node.JS
uses: actions/setup-node@v4
with:
node-version: 20
- uses: Gr1N/setup-poetry@v8
with:
poetry-version: "1.8.1"
- name: Test
uses: gradle/actions/setup-gradle@v3
with:
arguments: test --continue
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
check_name: JUnit Test Report
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Post Slack Notification (On Fail)
if: failure() && github.repository == 'xtdb/xtdb' && github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "*{workflow}* has {status_message}:"
message_format: "{emoji} `test` job has {status_message} in *{workflow}*"
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
integration-test:
name: Integration Test
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Integration Test
uses: gradle/actions/setup-gradle@v3
with:
arguments: integration-test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
check_name: JUnit Integration Test Report
report_paths: '**/build/test-results/integration-test/TEST-*.xml'
- name: Post Slack Notification (On Fail)
if: failure() && github.repository == 'xtdb/xtdb' && github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "*{workflow}* has {status_message}:"
message_format: "{emoji} `integration-test` job has {status_message} in *{workflow}*"
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
slt-1:
name: SLT 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: SLT 1
uses: gradle/actions/setup-gradle@v3
with:
arguments: slt-test
slt-2:
name: SLT 2
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: SLT 2
uses: gradle/actions/setup-gradle@v3
with:
arguments: slt-test-2