Skip to content

Commit f7415a2

Browse files
committed
fix(ci): execute sonar analysis after test execution
1 parent 75e105e commit f7415a2

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

β€Ž.github/workflows/ci.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,6 @@ jobs:
2424
run: |
2525
git config --global --add safe.directory "$GITHUB_WORKSPACE"
2626
27-
- name: πŸ‘€ Sonar Scan
28-
if: github.ref == 'refs/heads/master'
29-
env:
30-
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
31-
SONAR_HOST_URL: ${{ vars.SONARQUBE_HOST }}
32-
run: |
33-
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Demo-App-backend -Dsonar.projectName='Demo App backend'
34-
35-
- name: πŸ€– Sonar Summary
36-
if: github.ref == 'refs/heads/master'
37-
run: |
38-
{
39-
echo "### πŸ€– Sonar Summary"
40-
echo "${{ vars.SONARQUBE_HOST }}"
41-
} >> $GITHUB_STEP_SUMMARY
42-
4327
- name: πŸ§ͺ Unit Tests
4428
run: |
4529
mvn test -Dtest="CucumberUnitTest" -Dsurefire.failIfNoSpecifiedTests=false
@@ -70,3 +54,19 @@ jobs:
7054
name: πŸ“‹ Integration Test Report
7155
reporter: java-junit
7256
path: "**/*CucumberIntegrationTest.xml"
57+
58+
- name: πŸ‘€ Sonar Scan
59+
if: github.ref == 'refs/heads/master'
60+
env:
61+
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
62+
SONAR_HOST_URL: ${{ vars.SONARQUBE_HOST }}
63+
run: |
64+
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Demo-App-backend -Dsonar.projectName='Demo App backend'
65+
66+
- name: πŸ€– Sonar Summary
67+
if: github.ref == 'refs/heads/master'
68+
run: |
69+
{
70+
echo "### πŸ€– Sonar Summary"
71+
echo "${{ vars.SONARQUBE_HOST }}"
72+
} >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
Β (0)