k3s/.github/workflows/install.yaml
Derek Nola 253f2a91f3
Some checks failed
Install Script / build (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Install Script / Smoke Test (push) Has been cancelled
Update install tests with new images, add alma10 (#13489)
* Update install tests with new images, add alma10

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Stop running each provisioning step individually for install tests

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2026-01-23 13:14:51 -08:00

88 lines
2.4 KiB
YAML

name: Install Script
on:
push:
branches: [main, master]
paths:
- "channel.yaml"
- "install.sh"
- "tests/install/**"
- ".github/workflows/install.yaml"
pull_request:
branches: [main, master]
paths:
- "install.sh"
- "tests/install/**"
- ".github/workflows/install.yaml"
workflow_dispatch: {}
permissions:
contents: read
jobs:
build:
uses: ./.github/workflows/build-k3s.yaml
test:
name: "Smoke Test"
needs: build
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
vm: [centos-9, alma-10, rocky-9, fedora, opensuse-leap, ubuntu-2404]
max-parallel: 3
defaults:
run:
working-directory: tests/install/${{ matrix.vm }}
env:
INSTALL_K3S_SKIP_DOWNLOAD: binary
steps:
- name: Remove Unnecessary Tools
working-directory: /
run: |
sudo rm -rf \
/home/linuxbrew \
/home/packer \
/opt/az \
/opt/microsoft \
/usr/lib/firefox \
/usr/lib/google-cloud-sdk \
/usr/local/julia* \
/usr/local/share/boost \
/usr/local/share/chromium \
/usr/local/share/powershell \
/usr/share/az* \
/usr/share/dotnet \
/usr/share/miniconda \
/usr/share/swift
df -khl
- name: "Checkout"
uses: actions/checkout@v6
with: {fetch-depth: 1}
- name: Set up vagrant and libvirt
uses: ./.github/actions/vagrant-setup
- name: "Vagrant Cache"
uses: actions/cache@v5
with:
path: |
~/.vagrant.d/boxes
key: vagrant-box-${{ matrix.vm }}
- name: "Vagrant Plugin(s)"
run: vagrant plugin install vagrant-k3s vagrant-reload vagrant-scp
- name: "Download k3s binary"
uses: actions/download-artifact@v7
with:
name: k3s-amd64
path: tests/install/${{ matrix.vm }}
- name: "Vagrant Up"
run: vagrant up --no-tty --no-provision
- name: "Prepare K3s binary"
run: |
chmod +x k3s
vagrant scp k3s /tmp/k3s
vagrant ssh -c "sudo mv /tmp/k3s /usr/local/bin/k3s"
- name: Run K3s Install Test
run: vagrant provision
- name: Cleanup VM
run: vagrant destroy -f