-
-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Thomas Hallgren <thomas@tada.se>
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
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
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 |