From 6ab51c071435822af19db9e9bf1de4d5eec27385 Mon Sep 17 00:00:00 2001 From: Younes Belkada <49240599+younesbelkada@users.noreply.github.com> Date: Thu, 1 Feb 2024 23:49:32 +0100 Subject: [PATCH] ENH: Run CI only if relevant files are modified (#1309) * Update tests.yml * Update .github/workflows/tests.yml --- .github/workflows/tests.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6d2162f022..4fd69d610e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,6 +5,13 @@ on: branches: [ main ] pull_request: branches: [ main ] + paths: + # Run only when relevant files are modified + - "trl/**.py" + - "examples/**.py" + - "scripts/**.py" + - ".github/**.yml" + - "tests/**.py" jobs: check_code_quality: @@ -72,4 +79,4 @@ jobs: pip install .[test] - name: Test with pytest run: | - make test \ No newline at end of file + make test