Arm64 builds #1135
Workflow file for this run
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: E2E Test Coverage | |
on: | |
push: | |
paths-ignore: | |
- "**.md" | |
- "channel.yaml" | |
- "install.sh" | |
- "tests/**" | |
- "!tests/e2e**" | |
- "!tests/docker**" | |
- ".github/**" | |
- "!.github/workflows/e2e.yaml" | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
- "channel.yaml" | |
- "install.sh" | |
- "tests/**" | |
- "!tests/e2e**" | |
- "!tests/docker**" | |
- ".github/**" | |
- "!.github/workflows/e2e.yaml" | |
workflow_dispatch: {} | |
permissions: | |
contents: read | |
jobs: | |
build: | |
uses: ./.github/workflows/build-k3s.yaml | |
with: | |
upload-image: true | |
build-arm64: | |
if : github.repository == 'k3s-io/k3s' | |
uses: ./.github/workflows/build-k3s.yaml | |
with: | |
arch: oracle-aarch64-4cpu-16gb | |
upload-image: true | |
e2e: | |
name: "E2E Tests" | |
needs: build | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
strategy: | |
fail-fast: false | |
matrix: | |
etest: [startup, s3, btrfs, externalip, privateregistry, embeddedmirror, wasm] | |
max-parallel: 3 | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
with: {fetch-depth: 1} | |
- name: Set up vagrant and libvirt | |
uses: ./.github/actions/vagrant-setup | |
- name: "Vagrant Cache" | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.vagrant.d/boxes | |
key: vagrant-box-ubuntu-2404 | |
- name: "Vagrant Plugin(s)" | |
run: vagrant plugin install vagrant-k3s vagrant-reload vagrant-scp | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache: false | |
- name: Install Kubectl | |
run: | | |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | |
- name: "Download k3s binary" | |
uses: actions/download-artifact@v4 | |
with: | |
name: k3s | |
path: ./dist/artifacts | |
- name: Run ${{ matrix.etest }} Test | |
env: | |
E2E_GOCOVER: "true" | |
run: | | |
chmod +x ./dist/artifacts/k3s | |
cd tests/e2e/${{ matrix.etest }} | |
go test -v -timeout=45m ./${{ matrix.etest}}_test.go -ci -local | |
- name: On Failure, Launch Debug Session | |
uses: lhotari/action-upterm@v1 | |
if: ${{ failure() }} | |
with: | |
## If no one connects after 5 minutes, shut down server. | |
wait-timeout-minutes: 5 | |
- name: Upload Results To Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: tests/e2e/${{ matrix.etest }}/coverage.out | |
flags: e2etests # optional | |
verbose: true # optional (default = false) | |
docker: | |
needs: build | |
name: Docker Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
dtest: [basics, bootstraptoken, cacerts, compat, lazypull, upgrade] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: "Download k3s image" | |
uses: actions/download-artifact@v4 | |
with: | |
name: k3s | |
path: ./dist/artifacts | |
- name: Load k3s image | |
run: docker image load -i ./dist/artifacts/k3s-image.tar | |
- name: Run ${{ matrix.dtest }} Test | |
run: | | |
chmod +x ./dist/artifacts/k3s | |
. ./scripts/version.sh | |
. ./tests/docker/test-helpers | |
. ./tests/docker/test-run-${{ matrix.dtest }} | |
echo "Did test-run-${{ matrix.dtest }} pass $?" | |
docker-arm64: | |
needs: build-arm64 | |
name: Docker Tests Arm64 | |
if: github.repository == 'k3s-io/k3s' | |
runs-on: oracle-aarch64-4cpu-16gb | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
dtest: [basics, bootstraptoken, cacerts, compat, upgrade] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache: false | |
- name: Install Support Tools | |
run: | | |
sudo apt-get update && sudo apt-get install -y wget gawk openssh-client openssh-server net-tools iptables | |
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_arm64 -O /usr/bin/yq &&\ | |
sudo chmod +x /usr/bin/yq | |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl" | |
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | |
- name: "Download k3s image" | |
uses: actions/download-artifact@v4 | |
with: | |
name: k3s-arm64 | |
path: ./dist/artifacts | |
- name: Load k3s image | |
run: docker image load -i ./dist/artifacts/k3s-image.tar | |
- name: Run ${{ matrix.dtest }} Test | |
run: | | |
mv ./dist/artifacts/k3s-arm64 ./dist/artifacts/k3s | |
chmod +x ./dist/artifacts/k3s | |
. ./scripts/version.sh | |
. ./tests/docker/test-helpers | |
. ./tests/docker/test-run-${{ matrix.dtest }} | |
echo "Did test-run-${{ matrix.dtest }} pass $?" | |
- name: On Failure, Launch Debug Session | |
uses: dereknola/[email protected] | |
if: ${{ failure() }} | |
with: | |
## If no one connects after 5 minutes, shut down server. | |
wait-timeout-minutes: 5 |