From 4d62741724e05cab9f1dc983b61cdab7638af601 Mon Sep 17 00:00:00 2001 From: faiq Date: Fri, 26 Jan 2024 09:39:29 -0600 Subject: [PATCH] fix: adds a link to repo in the gopath --- .github/workflows/build-dev.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-dev.yaml b/.github/workflows/build-dev.yaml index 305782d9de..8a8088ef5d 100644 --- a/.github/workflows/build-dev.yaml +++ b/.github/workflows/build-dev.yaml @@ -14,16 +14,8 @@ jobs: - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - run: mkdir -p /home/runner/work/go/src/github.com/ - - - run: export GOPATH=/home/runner/work/go - - name: Checkout uses: actions/checkout@v4 - with: - path: go/src/github.com/nutanix-cloud-native - - - run: pwd - uses: actions/cache@v3 with: @@ -50,8 +42,15 @@ jobs: - name: Run unit tests run: devbox run -- make unit-test + # go cov expects things to be properly placed under go path. + # GHA clones into /home/runner/work/repository so we create + # the directory under the right path and link it + - run: mkdir -p /home/runner/go/src/github.com/nutanix-cloud-native/ && ln -s /home/runner/work/cluster-api-provider-nutanix/cluster-api-provider-nutanix /home/runner/go/src/github.com/nutanix-cloud-native + + - run: ls /home/runner/go/src/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/ + - name: Run coverage report - run: devbox run -- make coverage + run: devbox run -- "make coverage" - name: Codecov uses: codecov/codecov-action@v3.1.4