From 4302601d9a95482486bb70bc26ecb40e4f161197 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 20 Dec 2024 15:52:33 +0200 Subject: [PATCH] Test on windows --- .github/workflows/ci.yaml | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cda25f8..4d81b81 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,14 +33,6 @@ jobs: run: | go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2 golangci-lint run - - name: Test - run: go test -coverprofile="coverage.out" -coverpkg "$(go list github.com/UiPath/uipathcli/... | grep -v 'test' | tr '\n' ',')" ./... - - name: Coverage - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - go install github.com/mattn/goveralls@latest - goveralls -coverprofile="coverage.out" -service="github" - name: Package run: ./build.sh && ./package.sh - name: Upload packages @@ -50,8 +42,31 @@ jobs: path: build/packages/ if-no-files-found: error + test: + runs-on: ubuntu-latest + outputs: + UIPATHCLI_VERSION: ${{ steps.version.outputs.UIPATHCLI_VERSION }} + env: + CGO_ENABLED: "0" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup go + uses: actions/setup-go@v5 + with: + go-version: '1.22.2' + cache: true + - name: Test + run: go test -coverprofile="coverage.out" -coverpkg "$(go list github.com/UiPath/uipathcli/... | grep -v 'test' | tr '\n' ',')" ./... + - name: Coverage + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + go install github.com/mattn/goveralls@latest + goveralls -coverprofile="coverage.out" -service="github" + publish_pages: - needs: build + needs: [build, test] permissions: pages: write id-token: write @@ -79,7 +94,7 @@ jobs: uses: actions/deploy-pages@v4 release: - needs: build + needs: [build, test] if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest env: