-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (68 loc) · 2.66 KB
/
molecule.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
69
70
71
72
73
---
# This is a basic workflow to help you get started with Actions
name: Molecule
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
pull_request:
branches:
- master
- tags/*
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: add vagrant apt key
run: |
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
- name: add vagrant apt repository
run: |
sudo apt-add-repository -y "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
- name: update apt
run: |
sudo apt update
# - name: apt upgrade
# run: |
# sudo apt upgrade
- name: install molecule apt prerequisite
run: |
sudo apt -y install bridge-utils dnsmasq-base ebtables libvirt-dev qemu-kvm libvirt-daemon-system libvirt-daemon libvirt-clients qemu-utils ruby-dev ca-certificates curl gcc iproute2 sudo rustc vagrant python3 python3-pip python3-setuptools cpu-checker
- name: start libvirtd
run: |
sudo systemctl restart libvirtd
- name: chmod libvirt socket
run: |
sudo chmod o+rwx /var/run/libvirt/libvirt-sock
- name: vagrant install packages
run: |
vagrant plugin install vagrant-libvirt
- name: pip install packages
run: |
pip3 install wheel setuptools-rust netaddr
pip3 install ansible-compat==0.5.0
pip3 install pyopenssl python-vagrant yamllint pytest-testinfra flake8 ansible ansible-lint molecule molecule-vagrant
pip3 install -U PyYAML
# - name: Test KVM conditions fails
# run: |
# sudo kvm-ok
- name: molecule lint
run: |
molecule lint
requirements:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: install prereq
run: |
ansible-galaxy collection install -r requirements.yml
ansible-galaxy role install -r requirements.yml