Add CI and inspire other playbook (#6) #75
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: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install needs | |
run: | | |
pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r dev-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 |