@@ -46,10 +46,25 @@ jobs:
46
46
int_tests : true
47
47
secrets : inherit
48
48
49
+ detect-user :
50
+ name : Detect user team membership
51
+ runs-on : ubuntu-latest
52
+ outputs :
53
+ IS_TEAM_MEMBER : ${{ steps.author.outputs.isTeamMember }}
54
+ steps :
55
+ - name : Get PR author
56
+ if : github.event_name == 'pull_request'
57
+ id : author
58
+ uses : tspascoal/get-user-teams-membership@v2
59
+ with :
60
+ username : ${{ github.actor }}
61
+ team : ' Vector'
62
+ GITHUB_TOKEN : ${{ secrets.GH_PAT_ORG }}
63
+
49
64
integration-tests :
50
65
name : Integration Tests
51
66
runs-on : [linux, ubuntu-20.04-4core]
52
- needs : changes
67
+ needs : [ changes, detect-user]
53
68
if : always() && (
54
69
github.event_name == 'merge_group' || (
55
70
needs.changes.outputs.all-int == 'true'
@@ -103,7 +118,8 @@ jobs:
103
118
max_attempts : 3
104
119
command : bash scripts/ci-integration-test.sh amqp
105
120
106
- - if : ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.appsignal == 'true' }}
121
+ - if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.appsignal == 'true') &&
122
+ (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
107
123
name : appsignal
108
124
uses : nick-fields/retry@v2
109
125
with :
@@ -119,7 +135,8 @@ jobs:
119
135
max_attempts : 3
120
136
command : bash scripts/ci-integration-test.sh aws
121
137
122
- - if : ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.axiom == 'true' }}
138
+ - if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.axiom == 'true') &&
139
+ (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
123
140
name : axiom
124
141
uses : nick-fields/retry@v2
125
142
with :
@@ -143,39 +160,44 @@ jobs:
143
160
max_attempts : 3
144
161
command : bash scripts/ci-integration-test.sh clickhouse
145
162
146
- - if : ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.databend == 'true' }}
163
+ - if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.databend == 'true') &&
164
+ (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
147
165
name : databend
148
166
uses : nick-fields/retry@v2
149
167
with :
150
168
timeout_minutes : 30
151
169
max_attempts : 3
152
170
command : bash scripts/ci-integration-test.sh databend
153
171
154
- - if : ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }}
172
+ - if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true') &&
173
+ (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
155
174
name : datadog-agent
156
175
uses : nick-fields/retry@v2
157
176
with :
158
177
timeout_minutes : 30
159
178
max_attempts : 3
160
179
command : bash scripts/ci-integration-test.sh datadog-agent
161
180
162
- - if : ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }}
181
+ - if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true') &&
182
+ (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
163
183
name : datadog-logs
164
184
uses : nick-fields/retry@v2
165
185
with :
166
186
timeout_minutes : 30
167
187
max_attempts : 3
168
188
command : bash scripts/ci-integration-test.sh datadog-logs
169
189
170
- - if : ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }}
190
+ - if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true') &&
191
+ (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
171
192
name : datadog-metrics
172
193
uses : nick-fields/retry@v2
173
194
with :
174
195
timeout_minutes : 30
175
196
max_attempts : 3
176
197
command : bash scripts/ci-integration-test.sh datadog-metrics
177
198
178
- - if : ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }}
199
+ - if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true') &&
200
+ (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
179
201
name : datadog-traces
180
202
uses : nick-fields/retry@v2
181
203
with :
0 commit comments