31
31
push :
32
32
branches :
33
33
- main
34
+ issue_comment :
35
+ types : [created]
36
+
37
+ permissions :
38
+ pull-requests : write
34
39
35
40
jobs :
41
+ # Check issue comment and notify that extended tests are running
42
+ check_issue_comment :
43
+ name : Check issue comment
44
+ runs-on : ubuntu-latest
45
+ if : github.event.issue.pull_request && github.event.comment.body == 'run extended tests'
46
+ steps :
47
+ - uses : actions/github-script@v7
48
+ with :
49
+ github-token : ${{secrets.GITHUB_TOKEN}}
50
+ script : |
51
+ github.rest.issues.createComment({
52
+ issue_number: context.issue.number,
53
+ owner: context.repo.owner,
54
+ repo: context.repo.repo,
55
+ body: "Running extended tests..."
56
+ })
36
57
# Check crate compiles and base cargo check passes
37
58
linux-build-lib :
38
59
name : linux build test
39
60
runs-on : ubuntu-latest
40
61
container :
41
62
image : amd64/rust
63
+ if : |
64
+ github.event_name == 'push' ||
65
+ (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == 'run extended tests')
42
66
steps :
43
67
- uses : actions/checkout@v4
44
68
- name : Setup Rust toolchain
55
79
runs-on : ubuntu-latest
56
80
container :
57
81
image : amd64/rust
82
+ if : |
83
+ github.event_name == 'push' ||
84
+ (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == 'run extended tests')
58
85
steps :
59
86
- uses : actions/checkout@v4
60
87
with :
75
102
runs-on : ubuntu-latest
76
103
container :
77
104
image : amd64/rust
105
+ if : |
106
+ github.event_name == 'push' ||
107
+ (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == 'run extended tests')
78
108
steps :
79
109
- uses : actions/checkout@v4
80
110
with :
94
124
runs-on : ubuntu-latest
95
125
container :
96
126
image : amd64/rust
127
+ if : |
128
+ github.event_name == 'push' ||
129
+ (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == 'run extended tests')
97
130
steps :
98
131
- uses : actions/checkout@v4
99
132
with :
@@ -105,3 +138,49 @@ jobs:
105
138
rust-version : stable
106
139
- name : Run sqllogictest
107
140
run : cargo test --profile release-nonlto --test sqllogictests -- --include-sqlite
141
+
142
+ notify_if_run_on_pr_success :
143
+ name : Notify
144
+ runs-on : ubuntu-latest
145
+ needs :
146
+ [
147
+ linux-test-extended,
148
+ hash-collisions,
149
+ sqllogictest-sqlite,
150
+ check_issue_comment,
151
+ ]
152
+ if : success()
153
+ steps :
154
+ - uses : actions/github-script@v7
155
+ with :
156
+ github-token : ${{secrets.GITHUB_TOKEN}}
157
+ script : |
158
+ github.rest.issues.createComment({
159
+ issue_number: context.issue.number,
160
+ owner: context.repo.owner,
161
+ repo: context.repo.repo,
162
+ body: "extended test suite ran successfully on this PR."
163
+ })
164
+
165
+ notify_if_run_on_pr_failure :
166
+ name : Notify
167
+ runs-on : ubuntu-latest
168
+ needs :
169
+ [
170
+ linux-test-extended,
171
+ hash-collisions,
172
+ sqllogictest-sqlite,
173
+ check_issue_comment,
174
+ ]
175
+ if : failure()
176
+ steps :
177
+ - uses : actions/github-script@v7
178
+ with :
179
+ github-token : ${{secrets.GITHUB_TOKEN}}
180
+ script : |
181
+ github.rest.issues.createComment({
182
+ issue_number: context.issue.number,
183
+ owner: context.repo.owner,
184
+ repo: context.repo.repo,
185
+ body: "extended test suite failed on this PR."
186
+ })
0 commit comments