diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 56e39fa..1ee52c9 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -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 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 7350476..804b88f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,10 @@ --- -dist: bionic +dist: focal language: python +python: + - "3.8" addons: apt: sources: @@ -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 diff --git a/requirements-collections.yml b/requirements-collections.yml index eca8913..d375301 100644 --- a/requirements-collections.yml +++ b/requirements-collections.yml @@ -1,4 +1,5 @@ --- collections: + - name: ansible.posix - name: community.libvirt - name: community.general diff --git a/tox.ini b/tox.ini index 26a47f7..e657b78 100644 --- a/tox.ini +++ b/tox.ini @@ -69,7 +69,7 @@ commands = [testenv:idempotence] allowlist_externals=mkdir setenv = - {[common-monorepo]setenv} + {[common-ansible-path]setenv} deps = -r requirements.txt commands =