Integrate k3s and multus #600
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: Snapshotter | |
on: | |
push: | |
paths-ignore: | |
- "**.md" | |
- "channel.yaml" | |
- "install.sh" | |
- "tests/**" | |
- "!tests/snapshotter/**" | |
- ".github/**" | |
- "!.github/workflows/snapshotter.yaml" | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
- "channel.yaml" | |
- "install.sh" | |
- "tests/**" | |
- "!tests/snapshotter/**" | |
- ".github/**" | |
- "!.github/workflows/snapshotter.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: [opensuse-leap] | |
snapshotter: [btrfs] | |
max-parallel: 1 | |
defaults: | |
run: | |
working-directory: tests/snapshotter/${{ matrix.snapshotter }}/${{ matrix.vm }} | |
env: | |
VAGRANT_EXPERIMENTAL: disks | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
with: { fetch-depth: 1 } | |
- name: "Download Binary" | |
uses: actions/download-artifact@v3 | |
with: { name: k3s, path: dist/artifacts/ } | |
- name: Set up vagrant and libvirt | |
uses: ./.github/actions/vagrant-setup | |
# Workaround for https://github.com/actions/cache/issues/1319 | |
- name: Move vagrant cache to /root | |
run: | | |
mkdir -p /tmp/boxes | |
sudo rm -rf /root/.vagrant.d/boxes | |
sudo mv -f /tmp/boxes /root/.vagrant.d | |
- name: "Vagrant Cache" | |
uses: actions/cache@v4 | |
with: | |
path: | | |
/tmp/boxes | |
/tmp/gems | |
key: vagrant-box-${{ matrix.vm }} | |
- name: "Vagrant Plugin(s)" | |
run: sudo vagrant plugin install vagrant-k3s | |
- name: "Vagrant Up ⏩ Install K3s" | |
run: sudo vagrant up | |
- name: "⏳ Node" | |
run: sudo vagrant provision --provision-with=k3s-wait-for-node | |
- name: "⏳ CoreDNS" | |
run: sudo vagrant provision --provision-with=k3s-wait-for-coredns | |
- name: "k3s-status" # kubectl get node,all -A -o wide | |
run: sudo vagrant provision --provision-with=k3s-status | |
- name: "k3s-snapshots" # if no snapshots then we fail | |
run: sudo vagrant provision --provision-with=k3s-snapshots | |
- name: Copy out vagrant boxes for cache | |
run: | | |
sudo mv -f /root/.vagrant.d/boxes /tmp/boxes | |
sudo chmod -R 777 /tmp/boxes |