-
Notifications
You must be signed in to change notification settings - Fork 13
45 lines (35 loc) · 1.11 KB
/
ci.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
36
37
38
39
40
41
42
43
44
45
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
name: lint & syntax check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache PIP
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install role requirements
uses: BSFishy/pip-action@v1
with:
requirements: "requirements.txt"
- name: Create ansible.cfg
run: "printf '[defaults]\nroles_path=./tests/requirements/:../' > ansible.cfg"
- name: ansible-lint
uses: ansible-community/[email protected]
- name: ansible-playbook syntax check
uses: dawidd6/action-ansible-playbook@3c534b3ba0bcbbee2b13fb45226f71acbaca2a76
with:
playbook: tests/test.yml
directory: "."
requirements: tests/requirements.yml
options: --syntax-check -i tests/inventory