Skip to content

Commit 6c4ccb5

Browse files
committed
don't proceed if metadata not computed
1 parent d4ff557 commit 6c4ccb5

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

.github/workflows/regression.yml

+33-2
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,16 @@ jobs:
126126
smp-version: ${{ steps.experimental-meta.outputs.SMP_CRATE_VERSION }}
127127
lading-version: ${{ steps.experimental-meta.outputs.LADING_VERSION }}
128128
steps:
129+
129130
- uses: actions/checkout@v3
130131

131-
- name: Find PR branch name (issue_comment)
132+
- name: Checkout PR (issue_comment)
132133
if: github.event_name == 'issue_comment'
133134
env:
134135
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
135136
run: gh pr checkout ${{ github.event.issue.number }}
136137

137-
- name: Find PR branch name (issue_comment)
138+
- name: Get PR branch name (issue_comment)
138139
id: get-pr-branch-name
139140
if: github.event_name == 'issue_comment'
140141
env:
@@ -184,6 +185,21 @@ jobs:
184185
echo "comparison sha is: ${COMPARISON_SHA}"
185186
echo "comparison tag is: ${COMPARISON_TAG}"
186187
188+
if [ "${BASELINE_SHA}" = "" ] ; then
189+
echo "BASELINE_SHA not found, exiting."
190+
exit 1
191+
fi
192+
193+
if [ "${COMPARISON_SHA}" = "" ] ; then
194+
echo "COMPARISON_SHA not found, exiting."
195+
exit 1
196+
fi
197+
198+
if [ "${PR_NUMBER}" = "" ] ; then
199+
echo "PR_NUMBER not found, exiting."
200+
exit 1
201+
fi
202+
187203
# If triggered by merge queue, the PR number is not available in the payload. While we restrict the number of PRs in the
188204
# queue to 1, we can get the PR number by parsing the merge queue temp branch's ref.
189205
- name: Get PR metadata (merge queue)
@@ -213,6 +229,21 @@ jobs:
213229
echo "comparison sha is: ${COMPARISON_SHA}"
214230
echo "comparison tag is: ${COMPARISON_TAG}"
215231
232+
if [ "${BASELINE_SHA}" = "" ] ; then
233+
echo "BASELINE_SHA not found, exiting."
234+
exit 1
235+
fi
236+
237+
if [ "${COMPARISON_SHA}" = "" ] ; then
238+
echo "COMPARISON_SHA not found, exiting."
239+
exit 1
240+
fi
241+
242+
if [ "${PR_NUMBER}" = "" ] ; then
243+
echo "PR_NUMBER not found, exiting."
244+
exit 1
245+
fi
246+
216247
- name: Setup experimental metadata
217248
id: experimental-meta
218249
run: |

0 commit comments

Comments
 (0)