-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (57 loc) · 1.53 KB
/
main.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
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Ansible-Test
on:
pull_request:
branches:
- master
push:
branches:
- master
- test
- create-workflow/*
jobs:
test:
runs-on: ${{matrix.os}}
continue-on-error: true
strategy:
matrix:
# version:
# - "stable"
# - "edge"
# - "test"
# - "nightly"
os:
- ubuntu-22.04
- ubuntu-20.04
python-version:
- "3.10"
steps:
- uses: actions/checkout@v3.3.0
# with:
# path: molecule_demo
- name: Set up Python
uses: actions/setup-python@v4.5.0
with:
python-version: ${{matrix.python-version}}
- uses: actions/cache@v3.2.3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: pip3 install -r requirements.txt
- name: set ansible config
run: printf '[defaults]\nroles_path=../' >ansible.cfg
# - name: Install ansible dependencies
# run: ansible-galaxy install -r requirements.yml
- name: check yaml linting
run: yamllint .
- name: check ansible lint
run: ansible-lint
- name: ansible syntax-check
run: ansible-playbook tests/test.yml -i tests/inventory --syntax-check
- name: molecule test
run: molecule test --scenario-name docker
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'