Skip to content

Distribution Install #420

Distribution Install

Distribution Install #420

name: Distribution Install
on:
pull_request:
push:
branches:
- main
schedule:
- cron: '50 12 * * 1-5'
jobs:
generate-matrix:
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- name: Generate matrix
id: generate-matrix
run: |
tests="$(ruby boxes.rb | jq -c -r '. | keys')"
echo "matrix=${tests}" >> ${GITHUB_OUTPUT}
verify-install:
needs: generate-matrix
timeout-minutes: 15
runs-on: ubuntu-20.04
env:
VAGRANT_DEFAULT_PROVIDER: docker
VAGRANT_LIBVIRT_DRIVER: qemu
strategy:
fail-fast: false
matrix:
distro: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Disable apparmor to allow containers use alternative paths
run: |
sudo systemctl stop apparmor
- name: Set up version to test
run: |
echo "QA_VAGRANT_LIBVIRT_VERSION=git-$(git submodule status -- vagrant-libvirt | cut -d' ' -f2)" >> ${GITHUB_ENV}
- name: Set up libvirt
run: |
./scripts/install.bash --vagrant-only
- uses: actions/cache@v3.2.3
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-${{ matrix.distro }}
restore-keys: |
${{ runner.os }}-
- name: launch target distro
run: |
vagrant up --no-provision ${{ matrix.distro }}
- name: test vagrant-libvirt in target distro
run: |
vagrant provision ${{ matrix.distro }}
finish:
needs: verify-install
runs-on: ubuntu-22.04
steps:
- name: Matrix finished
run: |
echo "success"