Skip to content

Forgot two sudos

Forgot two sudos #121

Workflow file for this run

name: test
on:
push:
branches:
- main
paths:
- ".github/workflows/test.yml"
- "base/**"
- "meta/**"
- "templates/**"
- "ansible.cfg"
- "goss.yaml"
- "requirements.txt"
- "Vagrantfile"
- "variables.yml"
- "vars.yaml"
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [focal, jammy, rhel8, rhel9]
steps:
- uses: actions/checkout@v4
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Cache Vagrant boxes
uses: actions/cache@v3
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
restore-keys: |
${{ runner.os }}-vagrant-
- name: Install Python
uses: actions/setup-python@v4
with:
cache: pip
- name: Run tests in Vagrant
run: |
sudo apt-get update -qq
sudo apt-get install -y virtualbox
pip install --upgrade pip
python -m venv env
source env/bin/activate
pip install -r requirements.txt
vagrant up ${{ matrix.os }}