Skip to content

feat: migrate to ansible collection #73

feat: migrate to ansible collection

feat: migrate to ansible collection #73

Workflow file for this run

---
name: CI
"on":
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
lint:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Check out the codebase
uses: actions/checkout@v2
- name: Create ansible.cfg
run: >
printf '[defaults]\nroles_path=./tests/requirements/:../\ncollections_path=./tests/requirements/:../'
> ansible.cfg
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install test dependencies
run: >
pip install wheel --upgrade
pip install --upgrade ansible ansible-lint yamllint
- name: Install Galaxy requirements
run: ansible-galaxy install -r tests/requirements.yml -p ./tests/requirements
- name: Run yamllint
run: yamllint .
- name: Run ansible-lint
run: ansible-lint
- name: Test syntax
run: ansible-playbook tests/test.yml -i tests/inventory --syntax-check
ansible-test:
name: Run ansible-test
runs-on: ubuntu-latest
steps:
- name: Perform sanity testing with ansible-test
uses: ansible-community/ansible-test-gh-action@release/v1
with:
testing-type: sanity