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 9, 2024
1 parent ee00374 commit 5fa1fef
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/wtest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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: |
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Allow your user to access the Docker CLI without needing root access.
sudo usermod -aG docker $USER
echo "export PATH="$PATH:$HOME/.local/bin" >> ~/.profile
echo "export DOCKER_HOST=tcp://localhost:2375" >> ~/.bashrc && source ~/.bashrc
docker run hello-world

0 comments on commit 5fa1fef

Please sign in to comment.