-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (55 loc) · 1.58 KB
/
ansible.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: ansible
on:
pull_request:
paths:
- "**"
- "!.github/**"
- ".github/workflows/ansible.yml"
- "!**.md"
concurrency:
group: "molecule-${{ github.ref }}"
cancel-in-progress: true
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
FORCE_COLOR: 1
jobs:
# lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Run ansible-later
# uses: patrickjahns/[email protected]
# with:
# config: .later.yml
# - name: Run ansible-lint
# uses: reviewdog/action-ansiblelint@v1
# with:
# reporter: github-pr-check
# fail_on_error: true
molecule:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
scenario:
- ubuntu2204
- debian12
steps:
- uses: actions/checkout@v4
- name: Prepare for KVM usage
run: |
sudo apt-get install -y mkisofs qemu-system-x86 qemu-utils
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
sudo usermod -a -G kvm $USER
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: pip
- name: Install python dependencies
run: python -m pip install -r requirements.txt
- name: Run ${{ matrix.scenario }} scenario
run: molecule test --scenario-name "${{ matrix.scenario }}"