(ci) Add arm64 vms to the test matrices #177
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: 'PR Testing with Nested VMs' | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test-install-task: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: | |
| - x86_64 | |
| - aarch64 | |
| os: | |
| - [almalinux, '8'] | |
| - [almalinux, '9'] | |
| - [almalinux, '10'] | |
| - [debian, '11'] | |
| - [debian, '12'] | |
| - [debian, '13'] | |
| - [rocky, '8'] | |
| - [rocky, '9'] | |
| - [rocky, '10'] | |
| - [ubuntu, '22.04'] | |
| - [ubuntu, '24.04'] | |
| - [ubuntu, '26.04'] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - id: install-bolt | |
| uses: ./.github/actions/bolt | |
| with: | |
| os-version: 24.04 | |
| - id: vm-cluster | |
| uses: jpartlow/nested_vms@v1 | |
| with: | |
| os: ${{ matrix.os[0] }} | |
| os-version: ${{ matrix.os[1] }} | |
| os-arch: ${{ matrix.arch }} | |
| image_version: ${{ matrix.os[2] }} | |
| host-root-access: true | |
| install-openvox: false | |
| vms: |- | |
| [ | |
| { | |
| "role": "agent", | |
| "count": 1, | |
| "cpus": 2, | |
| "mem_mb": 4096 | |
| } | |
| ] | |
| - name: Capture dereferenced inventory for use with openvox_bootstrap | |
| working-directory: kvm_automation_tooling | |
| run: |- | |
| bolt inventory --inventory terraform/instances/inventory.test.yaml show --format json --detail | \ | |
| jq '.inventory | with_entries(select(.key == "targets")) | del(.targets[0].groups)' | \ | |
| yq -P > ../inventory.yaml | |
| - name: Run openvox_bootstrap::install task on nested vm | |
| run: |- | |
| bolt task run openvox_bootstrap::install --inventory inventory.yaml --targets test-agent-1 | |
| - name: Verify openvox-agent is installed | |
| run: |- | |
| bolt task run openvox_bootstrap::check version=8 test=gt --inventory inventory.yaml --targets test-agent-1 | |
| # The rockylinux containers aren't set up for interacting with systemd | |
| # so using nested_vms for this test. | |
| test-install-and-stop: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: | |
| - x86_64 | |
| - aarch64 | |
| os: | |
| - [debian, '13'] | |
| - [rocky, '10'] | |
| - [ubuntu, '24.04'] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - id: install-bolt | |
| uses: ./.github/actions/bolt | |
| with: | |
| os-version: 24.04 | |
| - id: vm-cluster | |
| uses: jpartlow/nested_vms@v1 | |
| with: | |
| os: ${{ matrix.os[0] }} | |
| os-version: ${{ matrix.os[1] }} | |
| os-arch: ${{ matrix.arch }} | |
| image_version: ${{ matrix.os[2] }} | |
| host-root-access: true | |
| install-openvox: false | |
| vms: |- | |
| [ | |
| { | |
| "role": "agent", | |
| "count": 1, | |
| "cpus": 2, | |
| "mem_mb": 4096 | |
| } | |
| ] | |
| - name: Capture dereferenced inventory for use with openvox_bootstrap | |
| working-directory: kvm_automation_tooling | |
| run: |- | |
| bolt inventory --inventory terraform/instances/inventory.test.yaml show --format json --detail | \ | |
| jq '.inventory | with_entries(select(.key == "targets")) | del(.targets[0].groups)' | \ | |
| yq -P > ../inventory.yaml | |
| - name: Run openvox_bootstrap::install task on nested vm | |
| run: |- | |
| bolt task run openvox_bootstrap::install --inventory inventory.yaml --targets test-agent-1 stop_service=true | |
| - name: Verify openvox-agent is installed | |
| run: |- | |
| bolt task run openvox_bootstrap::check version=8 test=gt --inventory inventory.yaml --targets test-agent-1 | |
| - name: Verify service state | |
| run: |- | |
| set -e | |
| bolt command run '/opt/puppetlabs/bin/puppet resource service openvox-agent' --inventory inventory.yaml --targets test-agent-1 > service.state | |
| grep -E "ensure [ ]*=> [ ]*'stopped'" service.state | |
| grep -E "enable [ ]*=> [ ]*'false'" service.state |