2021-11-15 18:50:38 +00:00
|
|
|
name: Control Group
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
- "channel.yaml"
|
|
|
|
- "install.sh"
|
|
|
|
- "tests/**"
|
2022-03-15 17:29:56 +00:00
|
|
|
- "!tests/cgroup/**"
|
2021-11-15 18:50:38 +00:00
|
|
|
- ".github/**"
|
|
|
|
- "!.github/workflows/cgroup.yaml"
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
- "channel.yaml"
|
|
|
|
- "install.sh"
|
|
|
|
- "tests/**"
|
2022-03-15 17:29:56 +00:00
|
|
|
- "!tests/cgroup/**"
|
2021-11-15 18:50:38 +00:00
|
|
|
- ".github/**"
|
|
|
|
- "!.github/workflows/cgroup.yaml"
|
|
|
|
workflow_dispatch: {}
|
2023-01-12 21:57:57 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-11-15 18:50:38 +00:00
|
|
|
jobs:
|
|
|
|
prep:
|
|
|
|
name: "Prepare"
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
timeout-minutes: 40
|
|
|
|
steps:
|
|
|
|
- name: "Checkout"
|
2022-12-02 17:07:21 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-11-15 18:50:38 +00:00
|
|
|
with: { fetch-depth: 1 }
|
|
|
|
- name: "Build"
|
|
|
|
run: DOCKER_BUILDKIT=1 SKIP_VALIDATE=1 make
|
|
|
|
- name: "Upload"
|
2022-12-02 17:07:21 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-11-15 18:50:38 +00:00
|
|
|
with: { name: k3s, path: dist/artifacts/k3s }
|
|
|
|
test:
|
2021-12-22 20:16:43 +00:00
|
|
|
name: "Conformance Test"
|
2021-11-15 18:50:38 +00:00
|
|
|
needs: prep
|
|
|
|
# nested virtualization is only available on macOS hosts
|
2022-08-04 03:11:17 +00:00
|
|
|
runs-on: macos-12
|
2021-11-15 18:50:38 +00:00
|
|
|
timeout-minutes: 40
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-01-30 21:14:29 +00:00
|
|
|
vm: [fedora]
|
2021-11-15 18:50:38 +00:00
|
|
|
mode: [unified]
|
|
|
|
max-parallel: 1
|
|
|
|
defaults:
|
|
|
|
run:
|
2022-03-15 17:29:56 +00:00
|
|
|
working-directory: tests/cgroup/${{ matrix.mode }}/${{ matrix.vm }}
|
2021-11-15 18:50:38 +00:00
|
|
|
steps:
|
|
|
|
- name: "Checkout"
|
2022-12-02 17:07:21 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-11-15 18:50:38 +00:00
|
|
|
with: { fetch-depth: 1 }
|
|
|
|
- name: "Download Binary"
|
2023-01-17 19:04:34 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-11-15 18:50:38 +00:00
|
|
|
with: { name: k3s, path: dist/artifacts/ }
|
|
|
|
- name: "Vagrant Cache"
|
2022-11-21 20:58:50 +00:00
|
|
|
uses: actions/cache@v3
|
2021-11-15 18:50:38 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.vagrant.d/boxes
|
|
|
|
~/.vagrant.d/gems
|
2022-03-15 17:29:56 +00:00
|
|
|
key: cgroup-${{ hashFiles(format('tests/cgroup/{0}/{1}/Vagrantfile', matrix.mode, matrix.vm)) }}
|
2021-11-15 18:50:38 +00:00
|
|
|
id: vagrant-cache
|
|
|
|
continue-on-error: true
|
|
|
|
- name: "Vagrant Plugin(s)"
|
2023-01-30 21:14:29 +00:00
|
|
|
run: vagrant plugin install vagrant-k3s vagrant-reload
|
2021-12-22 20:16:43 +00:00
|
|
|
- name: "Vagrant Up"
|
2021-11-15 18:50:38 +00:00
|
|
|
run: vagrant up
|
2021-12-22 20:16:43 +00:00
|
|
|
- name: "K3s Prepare"
|
|
|
|
run: vagrant provision --provision-with=k3s-prepare
|
|
|
|
- name: ⏬ "K3s Install"
|
|
|
|
run: vagrant provision --provision-with=k3s-install
|
|
|
|
- name: ⏩ "K3s Start"
|
|
|
|
run: vagrant provision --provision-with=k3s-start
|
2021-11-15 18:50:38 +00:00
|
|
|
- name: "K3s Ready" # wait for k3s to be ready
|
|
|
|
run: vagrant provision --provision-with=k3s-ready
|
|
|
|
- name: "K3s Status" # kubectl get node,all -A -o wide
|
|
|
|
run: vagrant provision --provision-with=k3s-status
|
|
|
|
- name: "Sonobuoy (--mode=quick)"
|
|
|
|
env: {TEST_RESULTS_PATH: rootfull}
|
|
|
|
run: vagrant provision --provision-with=k3s-sonobuoy
|
|
|
|
- name: "K3s Stop" # stop k3s rootfull
|
|
|
|
run: vagrant ssh -- sudo systemctl stop k3s-server
|
|
|
|
- name: "Vagrant Reload"
|
|
|
|
run: vagrant reload
|
|
|
|
- name: "[Rootless] Starting K3s"
|
|
|
|
run: vagrant ssh -- systemctl --user start k3s-rootless
|
|
|
|
- name: "[Rootless] K3s Ready"
|
|
|
|
env: {TEST_KUBECONFIG: /home/vagrant/.kube/k3s.yaml}
|
|
|
|
run: vagrant provision --provision-with=k3s-ready
|
2023-01-30 21:14:29 +00:00
|
|
|
# - name: "[Rootless] Sonobuoy (--mode=quick)"
|
|
|
|
# env: {TEST_KUBECONFIG: /home/vagrant/.kube/k3s.yaml, TEST_RESULTS_PATH: rootless}
|
|
|
|
# run: vagrant provision --provision-with=k3s-sonobuoy
|