2020-10-23 22:24:50 +08:00
|
|
|
name: pytest
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'library/**.py'
|
2020-11-27 03:59:29 +08:00
|
|
|
- 'module_utils/**.py'
|
2020-10-23 22:24:50 +08:00
|
|
|
- 'plugins/filter/**.py'
|
|
|
|
- 'tests/library/**.py'
|
2020-11-27 03:59:29 +08:00
|
|
|
- 'tests/module_utils/**.py'
|
2020-10-23 22:24:50 +08:00
|
|
|
- 'tests/plugins/filter/**.py'
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-06-15 14:41:55 +08:00
|
|
|
python-version: [3.8]
|
2020-10-23 22:24:50 +08:00
|
|
|
name: Python ${{ matrix.python-version }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
architecture: x64
|
|
|
|
- run: pip install -r tests/requirements.txt
|
2020-11-27 03:59:29 +08:00
|
|
|
- run: pytest --cov=library/ --cov=module_utils/ --cov=plugins/filter/ -vvvv tests/library/ tests/module_utils/ tests/plugins/filter/
|
2020-11-23 16:00:01 +08:00
|
|
|
env:
|
2020-11-28 01:25:11 +08:00
|
|
|
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/plugins/filter:/home/runner/work/ceph-ansible/ceph-ansible"
|