-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Stéphane Graber <[email protected]>
- Loading branch information
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
end-to-end: | ||
name: End to end testing | ||
strategy: | ||
fail-fast: false | ||
timeout-minutes: 45 | ||
runs-on: | ||
- self-hosted | ||
- cpu-16 | ||
- mem-32G | ||
- disk-100G | ||
- arch-amd64 | ||
- image-debian-12 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install --no-install-recommends --yes \ | ||
ansible \ | ||
ceph-base \ | ||
ceph-common \ | ||
python3-jmespath | ||
- name: Setup Incus | ||
run: | | ||
curl https://pkgs.zabbly.com/get/incus-daily | sudo sh | ||
sudo chmod 666 /var/lib/incus/unix.socket | ||
incus admin init --auto | ||
- name: Setup OpenTofu | ||
run: | | ||
curl -sL https://get.opentofu.org/install-opentofu.sh -o install-opentofu.sh | ||
chmod +x install-opentofu.sh | ||
./install-opentofu.sh --install-method deb | ||
rm -f install-opentofu.sh | ||
- name: Create the test VMs | ||
run: | | ||
cd terraform | ||
tofu init | ||
tofu apply -auto-approve -target=module.baremetal | ||
- name: Waiting for VMs to boot up | ||
run: | | ||
sleep 1m | ||
- name: Deploy the test VMs | ||
run: | | ||
cd ansible | ||
cp hosts.yaml.example hosts.yaml | ||
ansible-playbook deploy.yaml | ||
- name: Post deployment validation | ||
run: | | ||
export INCUS_PROJECT=dev-incus-deploy | ||
incus exec server01 -- incus launch images:debian/12 c1 | ||
sleep 30s | ||
incus list | ||
incus exec server01 -- incus exec c1 -- ping -4 -W1 -c4 linuxcontainers.org | ||
incus exec server01 -- incus exec c1 -- ping -6 -W1 -c4 linuxcontainers.org |