From 3b35a39b8bf0df1e275b71a460e8d8a041c286fd Mon Sep 17 00:00:00 2001 From: Nathan Weinberg <31703736+nathan-weinberg@users.noreply.github.com> Date: Mon, 17 Mar 2025 18:20:29 -0400 Subject: [PATCH] ci: limit PR testing based on modified files (#1644) # What does this PR do? rather than have unit and functional tests run on all PRs, we should only have them run on PRs changing relevant files Signed-off-by: Nathan Weinberg --- .github/workflows/integration-tests.yml | 13 +++++++++++-- .github/workflows/unit-tests.yml | 8 ++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 94347ad90..ec782c331 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,9 +1,18 @@ name: Integration tests on: - pull_request: push: - branches: [main] + branches: [ main ] + pull_request: + branches: [ main ] + paths: + - 'distributions/**' + - 'llama_stack/**' + - 'tests/integration/**' + - 'uv.lock' + - 'pyproject.toml' + - 'requirements.txt' + - '.github/workflows/integration-tests.yml' # This workflow jobs: ollama: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index c7a30e9b8..6d6e91f22 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -5,6 +5,14 @@ on: branches: [ main ] pull_request: branches: [ main ] + paths: + - 'distributions/**' + - 'llama_stack/**' + - 'tests/unit/**' + - 'uv.lock' + - 'pyproject.toml' + - 'requirements.txt' + - '.github/workflows/unit-tests.yml' # This workflow workflow_dispatch: jobs: