forked from k3s-io/k3s
-
Notifications
You must be signed in to change notification settings - Fork 5
73 lines (71 loc) · 2.09 KB
/
snapshotter.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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
# nested virtualization is only available on macOS hosts
runs-on: macos-12
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: "Vagrant Cache"
uses: actions/cache@v3
with:
path: |
~/.vagrant.d/boxes
~/.vagrant.d/gems
key: snapshotter-${{ hashFiles(format('tests/snapshotter/{0}/{1}/Vagrantfile', matrix.snapshotter, matrix.vm)) }}
id: vagrant-cache
continue-on-error: true
- name: "Vagrant Plugin(s)"
run: vagrant plugin install vagrant-k3s
- name: "Vagrant Up ⏩ Install K3s"
run: vagrant up
- name: "⏳ Node"
run: vagrant provision --provision-with=k3s-wait-for-node
- name: "⏳ CoreDNS"
run: vagrant provision --provision-with=k3s-wait-for-coredns
- name: "k3s-status" # kubectl get node,all -A -o wide
run: vagrant provision --provision-with=k3s-status
- name: "k3s-snapshots" # if no snapshots then we fail
run: vagrant provision --provision-with=k3s-snapshots