Merge pull request #465 from SquirrelCorporation/chore-better-ansible… #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .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' |