Skip to content

Commit 7a83cd7

Browse files
committed
CI: see if wsl2 works
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
1 parent 781d1b8 commit 7a83cd7

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

.github/workflows/test.yml

+25-3
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,41 @@ jobs:
7373

7474
windows:
7575
name: "Windows tests"
76-
runs-on: windows-2022
76+
runs-on: windows-2022-8-cores
7777
timeout-minutes: 30
7878
steps:
79+
- name: Enable WSL2
80+
run: |
81+
wsl --set-default-version 2
82+
wsl --update
83+
wsl --status
84+
wsl --list --online
85+
- name: Install WSL2 distro
86+
timeout-minutes: 3
87+
run: |
88+
# FIXME: At least one distro has to be installed here,
89+
# otherwise `wsl --list --verbose` (called from Lima) fails:
90+
# https://github.com/lima-vm/lima/pull/1826#issuecomment-1729993334
91+
# The distro image itself is not consumed by Lima.
92+
# ------------------------------------------------------------------
93+
# Ubuntu-22.04: gets stuck in some infinite loop during adduser
94+
# OracleLinux_9_1: almostly silently fails, and just prints "Usage: adduser [options] LOGIN"
95+
wsl --install -d openSUSE-Leap-15.5
96+
wsl --list --verbose
7997
- uses: actions/checkout@v4
8098
with:
8199
fetch-depth: 1
82100
- uses: actions/setup-go@v4
83101
with:
84102
go-version: 1.21.x
85-
- name: Unit tests
86-
run: go test -v ./...
87103
- name: Make
88104
run: make
105+
- name: Smoke test
106+
run: |
107+
.\_output\bin\limactl.exe start template://experimental/wsl2
108+
# TODO: run the full integration tests
109+
- name: Unit tests
110+
run: go test -v ./...
89111

90112
integration:
91113
name: Integration tests

0 commit comments

Comments
 (0)