| 1 |
name: cloud-utils ci |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
jobs: |
| 6 |
pre-commit: |
| 7 |
runs-on: ubuntu-26.04 |
| 8 |
steps: |
| 9 |
- name: Git checkout |
| 10 |
uses: actions/checkout@v4 |
| 11 |
- name: Set up Python |
| 12 |
uses: actions/setup-python@v5 |
| 13 |
with: |
| 14 |
python-version: '3.x' |
| 15 |
- name: Run pre-commit checks |
| 16 |
uses: pre-commit/[email protected] |
| 17 |
tox: |
| 18 |
runs-on: ubuntu-26.04 |
| 19 |
steps: |
| 20 |
- name: Install dependencies |
| 21 |
run: | |
| 22 |
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy update |
| 23 |
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy install tox |
| 24 |
- name: Git checkout |
| 25 |
uses: actions/checkout@v4 |
| 26 |
- name: Run tox |
| 27 |
run: tox |
| 28 |
test: |
| 29 |
runs-on: ubuntu-26.04 |
| 30 |
steps: |
| 31 |
- name: Install dependencies |
| 32 |
run: | |
| 33 |
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy update |
| 34 |
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy install lvm2 fdisk gdisk qemu-utils busybox |
| 35 |
- name: Git checkout |
| 36 |
uses: actions/checkout@v4 |
| 37 |
- name: Run tests |
| 38 |
# SKIP growpart-lvm test that does not work on github c-i |
| 39 |
run: sudo SKIP=growpart-lvm PATH=$PWD/bin:$PATH ./test/run-all |
| 40 |
- name: Run tests against BusyBox-based minimal environment |
| 41 |
# SKIP growpart-lvm test as LVM tools are not available in BusyBox |
| 42 |
run: | |
| 43 |
mkdir /tmp/busybox-bin |
| 44 |
busybox --install -s /tmp/busybox-bin |
| 45 |
ln -s $(command -v flock mkfs.ext4 qemu-img qemu-nbd resize2fs sfdisk sgdisk) /tmp/busybox-bin |
| 46 |
sudo SKIP=growpart-lvm PATH=$PWD/bin:/tmp/busybox-bin ./test/run-all |