Skip to content

Commit 72ce601

Browse files
committed
Only run tests when internal PR or after push
1 parent 7499989 commit 72ce601

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/scripts/lint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ set -e
1818
export LC_ALL=C.UTF-8
1919
export LANG=C.UTF-8
2020

21-
if [ -f "${HOME}/changed_files.txt" ]; then
22-
# TODO - Check for .pylintrc changes
21+
CL_FILE="${HOME}/changed_files.txt"
22+
23+
if [ -f "${CL_FILE}" ] && ! grep -q .pylintrc "${CL_FILE}"; then
2324
cat "${HOME}/changed_files.txt" | grep ".py$" | xargs pylint
2425
else
2526
find . -iname "*.py" | xargs pylint

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
run: ./.github/scripts/lint.sh
2929
test:
3030
runs-on: ubuntu-latest
31+
# Only run for internal PRs or after a merge
32+
if: ${{ github.event.push || github.event.pull_request.head.repo.full_name == github.repository }}
3133
strategy:
3234
matrix:
3335
# TODO - expand matrix once stable

0 commit comments

Comments
 (0)