Add CI and inspire other playbook #70
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: Linter | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- 'roles/**' | |
- '**.yml' | |
- '**.sh' | |
workflow_dispatch: | |
jobs: | |
ansible: | |
name: Ansible Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install needs | |
run: | | |
pip install --upgrade pip | |
pip install -r requirements.txt | |
ansible-galaxy install -r requirements.yml | |
- name: Run ansible-lint | |
uses: ansible/ansible-lint@main | |
- name: Test the playbook's syntax | |
run: ansible-playbook -i hosts macinstall.yml --syntax-check | |
shell: | |
name: ShellCheck Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install shellcheck | |
run: sudo apt install shellcheck | |
- name: Run shellcheck | |
run: shellcheck tests/uninstall-homebrew.sh |