Release 0.2.0 (#118) #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Genisys Generate | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
test-generate: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install pipx and Poetry | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pipx | |
pipx install poetry | |
- name: Set up Python with Poetry's Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Cache Poetry | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pypoetry | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-poetry- | |
- name: Install System Dependencies | |
run: sudo apt-get update && sudo apt-get install -y iptables-persistent netfilter-persistent vsftpd dnsmasq openvswitch-switch | |
- name: Check and Fix Permissions for Netplan | |
run: | | |
sudo chmod 600 /etc/netplan/50-cloud-init.yaml || echo "Netplan config not found, skipping" | |
- name: Ensure Open vSwitch is Running | |
run: | | |
sudo systemctl start ovsdb-server | |
sudo systemctl enable ovsdb-server | |
sudo systemctl status ovsdb-server || sudo journalctl -xeu ovsdb-server | |
- name: Install Dependencies | |
run: | | |
sudo $(which poetry) install | |
- name: Test Generate Command with Sudo and Root Flag | |
run: | | |
sudo $(which poetry) run genisys generate --file tests/scripts/tests/default/data/test_config.yaml --root temp_directory |