From 9f644b6e956a73386d3a351cccfa6579ef6931af Mon Sep 17 00:00:00 2001 From: Rachit Sonthalia Date: Mon, 9 Sep 2024 20:34:25 +0530 Subject: [PATCH] addressed feedback --- .github/workflows/test-unit.yml | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 21683e3d..978efe86 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -1,4 +1,4 @@ -name: Test Unit +name: Test Unit and SonarCloud analysis on: push: @@ -20,6 +20,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Install Go uses: actions/setup-go@v3 @@ -30,30 +32,9 @@ jobs: - name: Test run: make test-unit - - - name: Archive code coverage results - uses: actions/upload-artifact@v3 - with: - name: code-coverage-report - path: coverage.out - - sonar-cloud: - needs: test-unit - name: SonarCloud - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - - name: Download code coverage results - uses: actions/download-artifact@v3 - with: - name: code-coverage-report - + - name: Analyze with SonarCloud uses: sonarsource/sonarcloud-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file