-
Notifications
You must be signed in to change notification settings - Fork 21
53 lines (44 loc) · 1.33 KB
/
test-playbooks.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
# .github/workflows/molecule.yml
name: Tests - Playbooks
on:
push:
paths:
- 'server/src/tests/molecule/**'
- 'server/src/ansible/**'
branches: [ master ]
pull_request:
paths:
- 'server/src/tests/molecule/**'
- 'server/src/ansible/**'
branches: [ master ]
workflow_dispatch:
jobs:
molecule-tests:
runs-on: ubuntu-latest
env:
ANSIBLE_ASYNC_DIR: "/tmp/.ansible_async"
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
path: "${{ github.repository }}"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install Ansible and Molecule
working-directory: SquirrelCorporation/SquirrelServersManager/server/src/tests/molecule
run: |
python -m pip install --upgrade pip
pip install ansible molecule ansible-lint
pip install -r requirements.txt
- name: Install Ansible Collections
run: ansible-galaxy collection install community.docker
- name: Molecule
uses: gofrolist/molecule-action@v2
with:
molecule_working_dir: SquirrelCorporation/SquirrelServersManager/server/src/tests/
molecule_command: test
env:
ANSIBLE_FORCE_COLOR: '1'