Use yaml file extension consistently #1
Workflow file for this run
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: Test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - 'container-images/**' | |
| - '.github/workflows/container.yaml' | |
| - 'docs/**' | |
| pull_request: | |
| paths-ignore: | |
| - 'container-images/**' | |
| - '.github/workflows/container.yaml' | |
| - 'docs/**' | |
| concurrency: | |
| group: ${{ github.ref_name }}-${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| ansible-lint: | |
| name: Ansible Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run ansible-lint on src | |
| uses: ansible/ansible-lint@main | |
| with: | |
| requirements_file: requirements.yaml | |
| working_directory: src | |
| - name: Run ansible-lint on development | |
| uses: ansible/ansible-lint@main | |
| with: | |
| requirements_file: requirements.yaml | |
| working_directory: development | |
| tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| certificate_source: | |
| - default | |
| - installer | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Setup libvirt for Vagrant | |
| run: | | |
| sudo add-apt-repository --yes ppa:evgeni/vagrant | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends vagrant vagrant-libvirt libvirt-clients libvirt-daemon-system libvirt-daemon qemu-system-x86 qemu-utils dnsmasq | |
| sudo chmod 666 /var/run/libvirt/libvirt-sock | |
| - name: Install Ansible | |
| run: pip install --upgrade ansible-core | |
| - name: Setup environment | |
| run: ./setup-environment | |
| - name: Start VMs | |
| run: | | |
| ./forge vms start | |
| - name: Configure repositories | |
| run: | | |
| ./forge setup-repositories | |
| - name: Create installer certificates | |
| if: contains(matrix.certificate_source, 'installer') | |
| run: | | |
| ./forge installer-certs | |
| - name: Run image pull | |
| run: | | |
| ./foremanctl pull-images | |
| - name: Run deployment | |
| run: | | |
| ./foremanctl deploy --certificate-source=${{ matrix.certificate_source }} | |
| - name: Setup hammer | |
| run: | | |
| ./foremanctl setup-hammer | |
| - name: Run tests | |
| run: | | |
| ./forge test --pytest-args="--certificate-source=${{ matrix.certificate_source }}" | |
| - name: Generate sos reports | |
| if: ${{ always() }} | |
| run: ./forge sos | |
| - name: Archive sos reports | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sosreport-${{ matrix.certificate_source }} | |
| path: sos/ |