Skip to content

Commit

Permalink
Skip tests if label is set on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
samdoran committed Nov 15, 2024
1 parent f605bdf commit 6c099ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ci/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ function set_label_flags() {
return 1
fi

if ! grep -E 'lgtm|pr-check-build|.*smoke-tests|ok-to-skip-smokes' <<< "$PR_LABELS"; then
if ! grep -E 'lgtm|pr-check-build|.*smoke-tests|ok-to-skip-smokes|run-konflux-tests' <<< "$PR_LABELS"; then
SKIP_PR_CHECK='true'
EXIT_CODE=1
echo "PR check skipped"
elif grep -E 'ok-to-skip-smokes' <<< "$PR_LABELS"; then
SKIP_PR_CHECK='true'
echo "smokes not required"
elif grep -E 'run-konflux-tests' <<< "$PR_LABELS"; then
SKIP_PR_CHECK='true'
echo "Skipping test run since PR is labled to run tests in Konflux."
elif ! grep -E '.*smoke-tests' <<< "$PR_LABELS"; then
echo "WARNING! No smoke-tests labels found!, PR smoke tests will be skipped"
SKIP_SMOKE_TESTS='true'
Expand Down

0 comments on commit 6c099ce

Please sign in to comment.