Skip to content

Commit 794ed7a

Browse files
Allow running integration tests with an "integration" label (#191)
1 parent da2978a commit 794ed7a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
pull_request:
8+
types: [opened, synchronize, reopened, labeled]
89

910
concurrency:
1011
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -82,10 +83,13 @@ jobs:
8283
8384
COMMIT_MSG=$(git log --no-merges -1 --oneline)
8485
85-
# The integration tests will be triggered on push or on pull_request when the commit
86-
# message contains "[integration]" or if it is pushed to main branch.
86+
# The integration tests will be triggered on push or on pull_request, when:
87+
# the commit message contains "[integration]", or
88+
# if it is pushed to main branch, or
89+
# if the PR has the "integration" label.
8790
if [[ "$GITHUB_EVENT_NAME" == push && "$GITHUB_REF" == refs/heads/main ||
88-
"$COMMIT_MSG" =~ \[integration\] ]]; then
91+
"$COMMIT_MSG" =~ \[integration\] ||
92+
"${{ contains(github.event.pull_request.labels.*.name, 'integration') }}" == "true" ]]; then
8993
echo "trigger=true" >> "$GITHUB_OUTPUT"
9094
fi
9195

0 commit comments

Comments
 (0)