Skip to content

Commit

Permalink
[ci skip] hack idempotence
Browse files Browse the repository at this point in the history
  • Loading branch information
Tcharl committed Apr 30, 2023
1 parent 8ff136b commit 500f887
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 13 deletions.
62 changes: 53 additions & 9 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,62 @@ jobs:

# 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
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: update apt
run: |
sudo apt update
- name: install tox apt prerequisite
run: |
sudo apt -y install sudo python3 python3-pip
- name: pip install packages
run: |
pip3 install wheel setuptools tox
# - name: Test KVM conditions fails
# run: |
# sudo kvm-ok
- name: tox lint
run: |
tox -e lint
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest

- name: install prereq
# 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-get update
sudo apt -y install python3-setuptools vagrant
- name: Install molecule
sudo apt-add-repository -y "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
- name: update apt
run: |
sudo apt update
sudo apt -y install python3-setuptools python3 python3-pip
pip3 install wheel tox
- name: molecule lint
# - name: apt upgrade
# run: |
# sudo apt upgrade
- name: install libvirt apt prerequisite
run: |
tox -e lint
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 vagrant python3 python3-pip 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
./configure
- name: pip install packages
run: |
pip3 install wheel setuptools tox
# - name: Test KVM conditions fails
# run: |
# sudo kvm-ok
# - name: tox test
# run: |
# tox -e test-exec
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---

dist: bionic
dist: focal

language: python
python:
- "3.8"
addons:
apt:
sources:
Expand All @@ -24,8 +26,6 @@ addons:
- iproute2
- sudo
- vagrant
python:
- "3.8"

install:
# - wget https://releases.hashicorp.com/vagrant/$VAGRANT_VER/vagrant_"$VAGRANT_VER"_x86_64.deb
Expand Down
1 change: 1 addition & 0 deletions requirements-collections.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
collections:
- name: ansible.posix
- name: community.libvirt
- name: community.general
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ commands =
[testenv:idempotence]
allowlist_externals=mkdir
setenv =
{[common-monorepo]setenv}
{[common-ansible-path]setenv}
deps =
-r requirements.txt
commands =
Expand Down

0 comments on commit 500f887

Please sign in to comment.