diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 17289f3..e6a69a0 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -8,13 +8,14 @@ jobs: name: SonarCloud runs-on: ubuntu-latest env: + GOPATH: ${{ github.workspace }} WORKDIR: src/github.com/${{ github.repository }} strategy: matrix: go: [ '1.21', '1.20', '1.19', '1.18', '1.17' ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -23,7 +24,8 @@ jobs: with: go-version: ${{ matrix.go }} - - uses: actions/checkout@v4 + - name: Check out code into the Go module directory + uses: actions/checkout@v2 with: path: ${{ env.WORKDIR }} @@ -32,17 +34,6 @@ jobs: with: version: v1.54 - - name: Debug - run: | - pwd - echo ${HOME} - echo ${GITHUB_WORKSPACE} - ls -la ${GITHUB_WORKSPACE} - # echo ${GOPATH} - # echo ${GOROOT} - echo ${{github.workspace}} - echo src/github.com/${{github.repository}} - - name: Build working-directory: ${{ env.WORKDIR }} run: .github/scripts/setup.sh @@ -52,9 +43,6 @@ jobs: env: OMISE_PKEY: pkey_test_xxx OMISE_SKEY: skey_test_xxx - # moving GOPATH env here because having it in the top affected "Set up Go" step - # with error: Command failed: go env GOPATH $GOPATH/go.mod exists but should not - GOPATH: ${{ github.workspace }} run: .github/scripts/code-coverage.sh - name: SonarCloud Scan @@ -62,7 +50,3 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - args: > - -Dsonar.organization=omise - -Dsonar.projectKey=omise_omise-go -