Skip to content

Commit

Permalink
tests: add module_utils directory to flake8/pytest
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dsavineau authored and guits committed Nov 27, 2020
1 parent 67467fd commit 239a142
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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/
4 changes: 3 additions & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
File renamed without changes.

0 comments on commit 239a142

Please sign in to comment.