Hello everyone,
I’m trying to connect SonarCloud to one of my Github projects.
So I added a github-action file and, at the end, I run :
- name: Run backend test
run: |
chmod +x mvnw
./mvnw -ntp clean verify -P-webpack
- name: Run frontend test
run: npm run test
- name: Analyze code with SonarQube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Manerial_story_jhipster -Dsonar.login=$SONAR_TOKEN
The job reach it’s end without error, including Sonarcloud analysis.
This seems to work for the Java part of the code, but the Front is ignored.
I also checked sonar-project.properties, this seems correct (and TESTS-results-sonar.xml is correctly generated by github-action):
sonar.tests=src/test/
sonar.coverage.jacoco.xmlReportPaths=target/jacoco/test/jacoco.xml,target/jacoco/integrationTest/jacoco.xml
sonar.java.codeCoveragePlugin=jacoco
sonar.junit.reportPaths=target/test-results/test,target/test-results/integrationTest
sonar.testExecutionReportPaths=target/test-results/jest/TESTS-results-sonar.xml
sonar.typescript.lcov.reportPaths=target/test-results/lcov.info
Did I miss something ?
Thanks,
Manerial