2020-10-01 16:23:22 +08:00
|
|
|
name: ansible-lint
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
python-version: [ '2.7', '3.6' ]
|
|
|
|
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
|
2021-02-10 15:04:09 +08:00
|
|
|
- run: pip install -r <(grep ansible tests/requirements.txt) ansible-lint==4.3.7
|
|
|
|
if: matrix.python-version == '3.6'
|
2020-10-01 16:23:22 +08:00
|
|
|
- run: pip install -r <(grep ansible tests/requirements.txt) ansible-lint
|
2021-02-10 15:04:09 +08:00
|
|
|
if: matrix.python-version == '2.7'
|
2020-10-01 16:23:22 +08:00
|
|
|
- run: ansible-lint -x 106,204,205,208 -v --force-color ./roles/*/ ./infrastructure-playbooks/*.yml site-container.yml.sample site-container.yml.sample
|