feat: migrate to ansible collection #73
Workflow file for this run
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
--- | |
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 |