Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 7 additions & 68 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,9 @@ concurrency:
cancel-in-progress: true

jobs:
ansible-lint:
name: Ansible Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Run ansible-lint on src
uses: ansible/ansible-lint@main
with:
requirements_file: requirements.yml
working_directory: src
setup_python: false
- name: Run ansible-lint on development
uses: ansible/ansible-lint@main
with:
requirements_file: requirements.yml
working_directory: development
setup_python: false

tests:
strategy:
fail-fast: false
matrix:
certificate_source:
- default
- installer
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
Expand All @@ -54,51 +28,16 @@ jobs:
with:
python-version: '3.12'
- name: Setup libvirt for Vagrant
uses: voxpupuli/setup-vagrant@v0
- name: Install Ansible
run: pip install --upgrade ansible-core
- name: Setup environment
run: ./setup-environment
uses: ekohl/setup-vagrant@dns-hook
with:
configure_dns: true
- 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 }} --foreman-initial-admin-password=changeme
- name: Setup hammer
vagrant up --no-provision --no-tty quadlet
- name: Ping machine
run: |
./foremanctl setup-hammer
- name: Run tests
run: |
./forge test --pytest-args="--certificate-source=${{ matrix.certificate_source }}"
- name: Run smoker
run: |
./forge smoker
- name: Archive smoker report
if: ${{ always() }}
uses: actions/upload-artifact@v5
with:
name: smoker-${{ matrix.certificate_source }}
path: "/home/runner/smoker/report/"
- name: Generate sos reports
if: ${{ always() }}
run: ./forge sos
- name: Archive sos reports
if: ${{ always() }}
uses: actions/upload-artifact@v5
with:
name: sosreport-${{ matrix.certificate_source }}
path: sos/
resolvectl
ping -c1 quadlet.example.com
- name: Setup upterm session
if: ${{ failure() }}
uses: owenthereal/action-upterm@v1
Expand Down
2 changes: 2 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Vagrant.configure("2") do |config|
libvirt.memory = 10240
libvirt.cpus = 4
libvirt.machine_virtual_size = 30
libvirt.management_network_domain = 'example.com'
end

override.vm.provision('disk_resize', type: 'ansible') do |ansible_provisioner|
Expand All @@ -26,6 +27,7 @@ Vagrant.configure("2") do |config|

override.vm.provider "libvirt" do |libvirt, provider|
libvirt.memory = 1024
libvirt.management_network_domain = 'example.com'
end
end
end