Skip to content

Commit

Permalink
addressed feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rachit77 committed Sep 9, 2024
1 parent f38b819 commit 9f644b6
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Unit
name: Test Unit and SonarCloud analysis

on:
push:
Expand All @@ -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
Expand All @@ -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 }}

0 comments on commit 9f644b6

Please sign in to comment.