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 <dsavinea@redhat.com>
(cherry picked from commit 00b7ee27df)
pull/5958/head
Dimitri Savineau 2020-10-02 12:14:36 -04:00 committed by Dimitri Savineau
parent 0c66f90968
commit 79661bda7e
1 changed files with 7 additions and 1 deletions

View File

@ -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