Skip to content

Run tests against latest openSUSE Leap 15.5 #188

Run tests against latest openSUSE Leap 15.5

Run tests against latest openSUSE Leap 15.5 #188

Workflow file for this run

---
name: Run tests against latest openSUSE Leap 15.5
on:
push:
workflow_dispatch:
schedule:
- cron: "0 13 * * 0"
jobs:
run-tests:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download current box metadata needed for GitHub cache key
run: |
BOX_URL=$(cat tests/Vagrantfile | sed -n -E 's/.*config\.vm\.box_url = "([^"]*).*/\1/p')
wget -O tests/opensuse.json "${BOX_URL}"
- name: Cache Vagrant boxes
uses: actions/cache@v4
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('tests/opensuse.json') }}
save-always: true
- name: Show Vagrant version
run: vagrant --version
- name: Use Python 3.x
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install pipenv
run: pip install pipenv
- name: Cache pipenv environment
id: cache-pipenv
uses: actions/cache@v4
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
save-always: true
- name: Install required (and locked) dependecies with pipenv
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: pipenv install --dev
# Setting env variables as "pipenv run make -j2 setup" doesn't terminate
- name: Enable pipenv environment
run: |
echo "VIRTUAL_ENV=$(pipenv --venv)" >> $GITHUB_ENV
echo "$(pipenv --venv)/bin" >> $GITHUB_PATH
- name: Print environment variables
run: export
- name: Ensure to use the latest boxes
run: vagrant box update
working-directory: tests
- name: Prepare Vagrant test environment
run: make -j setup
working-directory: tests
- name: Run tests
run: make -k tests
working-directory: tests
- name: Gather facts
run: |
pip list
vagrant ssh -c "ip addr show" ns
vagrant ssh -c "ip addr show" sut
vagrant ssh -c "ip addr show" client
vagrant ssh -c "ip addr show" mail-sink
vagrant ssh -c "dig mydomain.test MX" client
vagrant ssh -c "ping -c 3 192.168.56.10" client
vagrant ssh -c "sudo journalctl --no-pager -n 50 -u named" ns
vagrant ssh -c "systemctl --no-page list-units --type=service" sut
vagrant ssh -c "sudo journalctl --no-pager -n 50 -u clamd" sut
vagrant ssh -c "sudo journalctl --no-pager -n 50 -u postfix" sut
vagrant ssh -c "sudo journalctl --no-pager -n 50 -u rspamd" sut
vagrant ssh -c "sudo journalctl --no-pager -n 50 -u dovecot" sut
working-directory: tests