From 8028e500719d746f38712e4cf5e63144ab2f7bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Fri, 29 Jul 2022 16:42:17 +0200 Subject: [PATCH] Add github test for windows using wine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will only run the unit tests, not any integration tests. For that, a real Windows machine (with Hyper-V) is needed... Signed-off-by: Anders F Björklund --- .github/workflows/test.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f2b764e67a6..a02a7f12ac3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,6 +51,27 @@ jobs: - name: Uninstall run: sudo make uninstall + cross-windows: + name: "Windows tests (cross)" + runs-on: ubuntu-20.04 + timeout-minutes: 30 + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.18.x + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + - name: Install wine + run: | + sudo apt-get update + sudo apt-get install -y wine-binfmt wine64 + sudo apt-get remove -y mono-runtime || true + - name: Unit tests + run: GOOS=windows GOARCH=amd64 go test -v ./... + - name: Make + run: make GOOS=windows GOARCH=amd64 + integration: name: Integration tests runs-on: macos-11