tests: add module_utils directory to flake8/pytest

This adds the module_utils and associated test directory into the flake8
and pytest workflow configuration.
It also moves the ca_common module_utils test file from tests/library to
it's own directory tests/module_utils.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
pull/6088/head
Dimitri Savineau 2020-11-26 14:59:29 -05:00 committed by Guillaume Abrioux
parent 67467fd87c
commit 239a14279d
3 changed files with 6 additions and 2 deletions

View File

@ -3,8 +3,10 @@ on:
pull_request:
paths:
- 'library/**.py'
- 'module_utils/**.py'
- 'tests/conftest.py'
- 'tests/library/**.py'
- 'tests/module_utils/**.py'
- 'tests/functional/tests/**.py'
jobs:
build:
@ -17,4 +19,4 @@ jobs:
python-version: 3.8
architecture: x64
- run: pip install flake8
- run: flake8 --max-line-length 160 ./library/ ./tests/library/ ./tests/conftest.py ./tests/functional/tests/
- run: flake8 --max-line-length 160 ./library/ ./module_utils/ ./tests/library/ ./tests/module_utils/ ./tests/conftest.py ./tests/functional/tests/

View File

@ -3,8 +3,10 @@ on:
pull_request:
paths:
- 'library/**.py'
- 'module_utils/**.py'
- 'plugins/filter/**.py'
- 'tests/library/**.py'
- 'tests/module_utils/**.py'
- 'tests/plugins/filter/**.py'
jobs:
build:
@ -21,6 +23,6 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: pip install -r tests/requirements.txt
- run: pytest --cov=library/ --cov=plugins/filter/ -vvvv tests/library/ tests/plugins/filter/
- run: pytest --cov=library/ --cov=module_utils/ --cov=plugins/filter/ -vvvv tests/library/ tests/module_utils/ tests/plugins/filter/
env:
PYTHONPATH: "$PYTHONPATH:/home/runner/work/ceph-ansible/ceph-ansible/library:/home/runner/work/ceph-ansible/ceph-ansible/module_utils:/home/runner/work/ceph-ansible/ceph-ansible"