From 746f3bffbdab14417207c65532fb408e4f1bc98d Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Wed, 13 Dec 2023 17:02:24 -0800 Subject: [PATCH] actions: test build on windows (#458) Signed-off-by: James Hillyerd --- .github/workflows/build-and-test.yml | 37 +++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 8b61eb4..34f006a 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -7,9 +7,9 @@ on: pull_request: jobs: - go-build: + linux-go-build: runs-on: ubuntu-latest - name: Go ${{ matrix.go }} build + name: Linux Go ${{ matrix.go }} build strategy: matrix: @@ -37,11 +37,40 @@ jobs: uses: shogo82148/actions-goveralls@v1 with: path-to-profile: profile.cov - flag-name: Go-${{ matrix.go }} + flag-name: Linux-Go-${{ matrix.go }} + parallel: true + + windows-go-build: + runs-on: windows-latest + name: Windows Go build + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: '1.20' + + - name: Build + run: go build ./... + + - name: Test + run: go test -race -coverprofile="profile.cov" ./... + + - name: Send coverage + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: profile.cov + flag-name: Windows-Go parallel: true coverage: - needs: go-build + needs: + - linux-go-build + - windows-go-build name: Test Coverage runs-on: ubuntu-latest