Skip to content

Merge pull request #439 from SquirrelCorporation/390-feat-git-reposit… #18

Merge pull request #439 from SquirrelCorporation/390-feat-git-reposit…

Merge pull request #439 from SquirrelCorporation/390-feat-git-reposit… #18

# .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'