forked from openshift-kni/baremetal-deploy
-
Notifications
You must be signed in to change notification settings - Fork 29
35 lines (27 loc) · 1.01 KB
/
ansible-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
name: Ansible Lint # feel free to pick your own name
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
# Important: This sets up your GITHUB_WORKSPACE environment variable
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/[email protected]
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
ansible-galaxy collection install -r ansible-ipi-install/requirements.yml
- name: Lint Ansible Playbook
run: |
ansible-lint -p --force-color -c .ansible-lint ansible-ipi-install/playbook.yml
...