33
33
push :
34
34
branches :
35
35
- main
36
+ issue_comment :
37
+ types : [ created ]
38
+
39
+ permissions :
40
+ pull-requests : write
36
41
37
42
jobs :
43
+ # Check issue comment and notify that extended tests are running
44
+ check_issue_comment :
45
+ name : Check issue comment
46
+ runs-on : ubuntu-latest
47
+ if : github.event.issue.pull_request && github.event.comment.body == 'run extended tests'
48
+ steps :
49
+ - uses : actions/github-script@v7
50
+ with :
51
+ github-token : ${{secrets.GITHUB_TOKEN}}
52
+ script : |
53
+ github.rest.issues.createComment({
54
+ issue_number: context.issue.number,
55
+ owner: context.repo.owner,
56
+ repo: context.repo.repo,
57
+ body: "Running extended tests..."
58
+ })
59
+
38
60
# Check crate compiles and base cargo check passes
39
61
linux-build-lib :
40
62
name : linux build test
41
63
runs-on : ubuntu-latest
42
64
container :
43
65
image : amd64/rust
66
+ if : |
67
+ github.event_name == 'push' ||
68
+ (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == 'run extended tests')
44
69
steps :
45
70
- uses : actions/checkout@v4
71
+ with :
72
+ # Check out the pull request if triggered by a comment
73
+ ref : ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request.head.sha || github.ref }}
74
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
75
+ submodules : true
76
+ fetch-depth : 1
46
77
- name : Setup Rust toolchain
47
78
uses : ./.github/actions/setup-builder
48
79
with :
59
90
runs-on : ubuntu-latest
60
91
container :
61
92
image : amd64/rust
93
+ if : |
94
+ github.event_name == 'push' ||
95
+ (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == 'run extended tests')
62
96
steps :
63
97
- uses : actions/checkout@v4
64
98
with :
99
+ # Check out the pull request if triggered by a comment
100
+ ref : ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request.head.sha || github.ref }}
101
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
65
102
submodules : true
66
103
fetch-depth : 1
67
104
- name : Setup Rust toolchain
@@ -81,9 +118,15 @@ jobs:
81
118
runs-on : ubuntu-latest
82
119
container :
83
120
image : amd64/rust
121
+ if : |
122
+ github.event_name == 'push' ||
123
+ (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == 'run extended tests')
84
124
steps :
85
125
- uses : actions/checkout@v4
86
126
with :
127
+ # Check out the pull request if triggered by a comment
128
+ ref : ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request.head.sha || github.ref }}
129
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
87
130
submodules : true
88
131
fetch-depth : 1
89
132
- name : Setup Rust toolchain
@@ -94,25 +137,72 @@ jobs:
94
137
run : |
95
138
cd datafusion
96
139
cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-sqllogictest --workspace --lib --tests --features=force_hash_collisions,avro,extended_tests
97
- cargo clean
98
140
99
141
sqllogictest-sqlite :
100
142
name : " Run sqllogictests with the sqlite test suite"
101
143
runs-on : ubuntu-latest
102
144
container :
103
145
image : amd64/rust
146
+ if : |
147
+ github.event_name == 'push' ||
148
+ (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == 'run extended tests')
104
149
steps :
105
150
- uses : actions/checkout@v4
106
151
with :
152
+ # Check out the pull request if triggered by a comment
153
+ ref : ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request.head.sha || github.ref }}
154
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
107
155
submodules : true
108
156
fetch-depth : 1
109
157
- name : Setup Rust toolchain
110
158
uses : ./.github/actions/setup-builder
111
159
with :
112
160
rust-version : stable
113
161
- name : Run sqllogictest
114
- run : |
115
- cargo test --profile release-nonlto --test sqllogictests -- --include-sqlite
116
- cargo clean
162
+ run : cargo test --profile release-nonlto --test sqllogictests -- --include-sqlite
117
163
164
+ notify_if_run_on_pr_success :
165
+ name : Notify
166
+ runs-on : ubuntu-latest
167
+ needs :
168
+ [
169
+ linux-test-extended,
170
+ hash-collisions,
171
+ sqllogictest-sqlite,
172
+ check_issue_comment,
173
+ ]
174
+ if : success()
175
+ steps :
176
+ - uses : actions/github-script@v7
177
+ with :
178
+ github-token : ${{secrets.GITHUB_TOKEN}}
179
+ script : |
180
+ github.rest.issues.createComment({
181
+ issue_number: context.issue.number,
182
+ owner: context.repo.owner,
183
+ repo: context.repo.repo,
184
+ body: "extended test suite ran successfully on this PR."
185
+ })
118
186
187
+ notify_if_run_on_pr_failure :
188
+ name : Notify
189
+ runs-on : ubuntu-latest
190
+ needs :
191
+ [
192
+ linux-test-extended,
193
+ hash-collisions,
194
+ sqllogictest-sqlite,
195
+ check_issue_comment,
196
+ ]
197
+ if : failure()
198
+ steps :
199
+ - uses : actions/github-script@v7
200
+ with :
201
+ github-token : ${{secrets.GITHUB_TOKEN}}
202
+ script : |
203
+ github.rest.issues.createComment({
204
+ issue_number: context.issue.number,
205
+ owner: context.repo.owner,
206
+ repo: context.repo.repo,
207
+ body: "extended test suite failed on this PR."
208
+ })
0 commit comments