From 540c497ec6abea297e08dc3f193f4ba9e53e5927 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Fri, 2 Oct 2020 12:14:36 -0400 Subject: [PATCH] flake8: run the workflow conditionally We don't need to run flake8 on ansible modules and their tests if we don't have any modifitions. Signed-off-by: Dimitri Savineau (cherry picked from commit 00b7ee27df59fb0d5a537f6c0ad11c910695126d) --- .github/workflows/flake8.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index ead3a9912..6814b2dd1 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -1,5 +1,11 @@ name: flake8 -on: [pull_request] +on: + pull_request: + paths: + - 'library/**.py' + - 'tests/conftest.py' + - 'tests/library/**.py' + - 'tests/functional/tests/**.py' jobs: build: runs-on: ubuntu-latest -- 2.39.5