Skip to content

Commit c41472d

Browse files
[Github] Only run libclang-python-tests on monorepo main
The libclang python binding test CI job currently doesn't have any restrictions on what branches it will run on when something is pushed and also isn't restricted to the monorepo. This patch adds a branch restriction for the push event, only running the CI job when something is pushed to the main branch (and the path filter is met), and also adds a filter to ensure that the job comes from a PR against the monorepo or a push to a branch in the monorepo.
1 parent b1778c7 commit c41472d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/libclang-python-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ permissions:
66
on:
77
workflow_dispatch:
88
push:
9+
branches:
10+
- 'main'
911
paths:
1012
- 'clang/bindings/python/**'
1113
- 'clang/tools/libclang/**'
@@ -30,6 +32,7 @@ jobs:
3032
check-clang-python:
3133
# Build libclang and then run the libclang Python binding's unit tests.
3234
name: Build and run Python unit tests
35+
if: github.repository == 'llvm/llvm-project'
3336
strategy:
3437
fail-fast: false
3538
matrix:

0 commit comments

Comments
 (0)