Skip to content

Commit

Permalink
Windows test
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Hallgren <thomas@tada.se>
  • Loading branch information
thallgren committed Aug 8, 2024
1 parent ee00374 commit e7d6797
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/wtest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "Windows Tests"
on:
push:

jobs:
use-wsl-minikube:
runs-on: windows-latest
steps:
- uses: Vampire/setup-wsl@v3
with:
distribution: Ubuntu-24.04

# We can't use docker (or WSL2) because virtualization is not available
- name: Install minikube in WSL
shell: wsl-bash {0}
run: |
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
iptables \
conntrack \
containerd \
ca-certificates \
curl \
wget
wget https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.31.0/crictl-v1.31.0-linux-amd64.tar.gz
sudo tar zxvf crictl-v1.31.0-linux-amd64.tar.gz -C /usr/local/bin
wget https://github.com/Mirantis/cri-dockerd/releases/download/v0.3.15/cri-dockerd_0.3.15.3-0.ubuntu-jammy_amd64.deb
sudo dpkg -i ./cri-dockerd_0.3.15.3-0.ubuntu-jammy_amd64.deb
wget https://github.com/containernetworking/plugins/releases/download/v1.5.1/cni-plugins-linux-amd64-v1.5.1.tgz
sudo mkdir -p /opt/cni/bin
sudo tar -xf cni-plugins-linux-amd64-v1.5.1.tgz -C /opt/cni/bin
sudo mkdir -p /etc/cni/net.d
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce-cli

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube && rm minikube-linux-amd64

# Run with --driver none so that tne WSL becomes the one and only node in the cluster
- name: Start minikube
shell: wsl-bash {0}
run: |
minikube start --driver none
cat ~/.kube/config

0 comments on commit e7d6797

Please sign in to comment.