Skip to content

Commit

Permalink
Merge pull request #17 from victorts1991/develop
Browse files Browse the repository at this point in the history
Update pipeline.yml
  • Loading branch information
victorts1991 authored May 20, 2024
2 parents 392d0aa + ea48ec0 commit e1861b6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ jobs:
- name: Check out code
uses: actions/checkout@v3
- name: Unit Tests
run: go clean -testcache && go test -v ./...
run: go clean -testcache && go test -v ./... -v -coverprofile=coverage.out
- uses: actions/upload-artifact@v4
with:
name: coverage.out
path: coverage.out

code-analisys:
needs: unit-test
Expand All @@ -20,13 +24,19 @@ jobs:
steps:
- name: Clone Repository
uses: actions/checkout@v3
- name: Download coverage reports
uses: actions/download-artifact@v4
with:
name: coverage.out
- name: Analyze with SonarCloud
uses: sonarsource/sonarcloud-github-action@master
with:
projectBaseDir: internal/core/usecase
args: >
-Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }}
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }}
-Dsonar.go.coverage.reportPaths=../../../coverage.out
-Dsonar.exclusions=**/*_test.go
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down

0 comments on commit e1861b6

Please sign in to comment.