From 7e405b31885e147f041518623e393793acbf3715 Mon Sep 17 00:00:00 2001 From: Nathan Weinberg Date: Wed, 18 Sep 2024 14:59:27 -0400 Subject: [PATCH] e2e: only run PR job if certain files are changed currently the E2E PR job runs on every single PR this commit aligns the triggering criteria for the job with the mergify automerge criteria Signed-off-by: Nathan Weinberg --- .github/mergify.yml | 1 + .github/workflows/e2e-nvidia-t4-x1.yml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/.github/mergify.yml b/.github/mergify.yml index 6056c944..7fb20bdd 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -28,6 +28,7 @@ pull_request_rules: # e2e workflow - or: - and: + # note this should match the triggering criteria in 'e2e-nvidia-t4-x1.yml' - check-success=e2e-workflow-complete - or: - files~=\.py$ diff --git a/.github/workflows/e2e-nvidia-t4-x1.yml b/.github/workflows/e2e-nvidia-t4-x1.yml index 2732dd4e..d7ea0c35 100644 --- a/.github/workflows/e2e-nvidia-t4-x1.yml +++ b/.github/workflows/e2e-nvidia-t4-x1.yml @@ -3,10 +3,12 @@ name: E2E (NVIDIA Tesla T4 x1) on: + # run against every merge commit to 'main' and release branches push: branches: - main - release-* + # only run on PRs that touch certain regex paths pull_request_target: types: - opened @@ -15,6 +17,12 @@ on: branches: - main - release-* + paths: + # note this should match the merging criteria in 'mergify.yml' + - '**.py' + - 'pyproject.toml' + - 'requirements**.txt' + - '.github/workflows/e2e-nvidia-t4-x1.yml' # This workflow concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}