Add Ansible Galaxy tag import workflow (#409) #22
This file contains hidden or 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: | |
| push: | |
| pull_request: | |
| jobs: | |
| syntax: | |
| name: Syntax check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Ansible | |
| run: python -m pip install --upgrade pip ansible-core | |
| - name: Install Ansible collections | |
| run: ansible-galaxy collection install ansible.posix community.general | |
| - name: Expose role as local-ansistrano | |
| run: ln -s "$GITHUB_WORKSPACE" "$GITHUB_WORKSPACE/../local-ansistrano" | |
| - name: Create local inventory | |
| run: printf 'localhost ansible_connection=local\n' > inventory | |
| - name: Run syntax check | |
| working-directory: test | |
| env: | |
| ANSIBLE_CONFIG: ${{ github.workspace }}/ansible.cfg | |
| run: ansible-playbook -i ../inventory --syntax-check main.yml | |
| integration: | |
| name: Integration tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Ansible | |
| run: python -m pip install --upgrade pip ansible-core | |
| - name: Install Ansible collections | |
| run: ansible-galaxy collection install ansible.posix community.general | |
| - name: Expose role as local-ansistrano | |
| run: ln -s "$GITHUB_WORKSPACE" "$GITHUB_WORKSPACE/../local-ansistrano" | |
| - name: Create local inventory | |
| run: printf 'localhost ansible_connection=local\n' > inventory | |
| - name: Run integration suite | |
| working-directory: test | |
| env: | |
| ANSIBLE_CONFIG: ${{ github.workspace }}/ansible.cfg | |
| ANSIBLE_VERSION: github-actions | |
| run: ansible-playbook -i ../inventory --connection=local --become -e update_cache=1 -v main.yml |