Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add sonarcloud reporting for aggregate test coverage in gax, api-common and showcase #1482

Merged
merged 46 commits into from
Mar 22, 2023
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
d7c919a
chore: add aggregate test coverage collection for showcase and gax
mpeddada1 Mar 2, 2023
135022c
add profile to collect test coverage
mpeddada1 Mar 2, 2023
d2be02f
add fmt-maven-plugin
mpeddada1 Mar 2, 2023
22cda89
add maven compiler version property
mpeddada1 Mar 2, 2023
cd0de15
skip fmt
mpeddada1 Mar 2, 2023
cddb9f2
add version to fmt plugin
mpeddada1 Mar 2, 2023
c116da1
add jar plugin to showcase
mpeddada1 Mar 2, 2023
208cfff
add jar plugin to gapic-showcase
mpeddada1 Mar 2, 2023
02ef0cb
empty commit to rerun builds
mpeddada1 Mar 2, 2023
7f720b8
empty commit
mpeddada1 Mar 3, 2023
68557fe
fix syntax in dep declaration
mpeddada1 Mar 3, 2023
57ddf93
remove spaces
mpeddada1 Mar 3, 2023
fcc5257
add README for coverage-report module
mpeddada1 Mar 6, 2023
45a0987
replace monorepo with repsitory in README
mpeddada1 Mar 6, 2023
47cf349
add profile to specify modules
mpeddada1 Mar 10, 2023
e61d6ea
chore: add sonarcloud reporting for showcase test coverage
mpeddada1 Mar 13, 2023
83f085d
Merge branch 'main' into sonar-coverage
mpeddada1 Mar 13, 2023
d4ba320
fix yaml syntax
mpeddada1 Mar 13, 2023
b856e7f
Merge branch 'sonar-coverage' of github.com:googleapis/gapic-generato…
mpeddada1 Mar 13, 2023
f574ec8
fix spacing
mpeddada1 Mar 13, 2023
61bb283
comment out previous step
mpeddada1 Mar 13, 2023
6c54fbe
avoid calling clean in mvn command
mpeddada1 Mar 13, 2023
644edc8
modify syntax:
mpeddada1 Mar 13, 2023
afcf7b1
omit yaml formatting
mpeddada1 Mar 13, 2023
cff1fa4
install and run showcase server
mpeddada1 Mar 13, 2023
b9db44f
set SHOWCASE VERSION env variable
mpeddada1 Mar 13, 2023
75a51ec
use forked repo for verification
mpeddada1 Mar 13, 2023
6972c9f
undo change
mpeddada1 Mar 13, 2023
7aab6ca
uncomment previous build step and temporarily address syntax error
mpeddada1 Mar 14, 2023
34869ff
omit mvn clean
mpeddada1 Mar 14, 2023
0d342c8
add mvn clean install
mpeddada1 Mar 14, 2023
5aa2013
call mvn install
mpeddada1 Mar 14, 2023
36d1633
remove mvn clean install
mpeddada1 Mar 14, 2023
6f7ead4
comment out unit test job
mpeddada1 Mar 14, 2023
63cec27
update SNAPSHOT versions
mpeddada1 Mar 14, 2023
efc6ecc
add clean
mpeddada1 Mar 14, 2023
9d676c0
add unit test step
mpeddada1 Mar 14, 2023
03fd1b9
fix syntax
mpeddada1 Mar 14, 2023
74fbf20
fix syntax
mpeddada1 Mar 14, 2023
7e4202a
rebase with main
mpeddada1 Mar 16, 2023
6264511
clean up pom.xml
mpeddada1 Mar 16, 2023
5a662a1
add api-common coverage
mpeddada1 Mar 21, 2023
1ab860b
fix pom syntax
mpeddada1 Mar 21, 2023
bcd8299
update screenshots in README
mpeddada1 Mar 21, 2023
27afb2e
fix renovate version comments
mpeddada1 Mar 21, 2023
4b60a61
Merge branch 'sonar-coverage' of github.com:googleapis/gapic-generato…
mpeddada1 Mar 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: add sonarcloud reporting for showcase test coverage
  • Loading branch information
mpeddada1 committed Mar 13, 2023
commit e61d6eacb2dc33099b5a2528aa8ee8dcfb2b5e80
26 changes: 26 additions & 0 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
@@ -40,4 +40,30 @@ jobs:
-Dsonar.projectKey=googleapis_gapic-generator-java \
-Dsonar.organization=googleapis \
-Dsonar.host.url=https://sonarcloud.io
- name: Build and analyze Showcase Integration Tests Coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run:
mvn -B clean verify -Dcheckstyle.skip \
-DskipUnitTests \
-Penable-integration-tests \
-DenableTestCoverage \
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.projectKey=googleapis_gapic-generator-java_integration_tests \
-Dsonar.organization=googleapis \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.projectName=java_showcase_integration_tests
- name: Build and analyze Showcase Unit Tests Coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run:
mvn -B clean test -Dcheckstyle.skip \
-DenableTestCoverage \
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.projectKey=googleapis_gapic-generator-java_unit_tests \
-Dsonar.organization=googleapis \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.projectName=java_showcase_unit_tests

15 changes: 15 additions & 0 deletions api-common-java/pom.xml
Original file line number Diff line number Diff line change
@@ -131,4 +131,19 @@
</plugin>
</plugins>
</build>

<!-- Omit api-common results when analyzing showcase test coverage on SonarCloud -->
<profiles>
<profile>
<id>showcase-sonar-analysis</id>
<activation>
<property>
<name>enableTestCoverage</name>
</property>
</activation>
<properties>
<sonar.skip>true</sonar.skip>
</properties>
</profile>
</profiles>
</project>
13 changes: 13 additions & 0 deletions gapic-generator-java/pom.xml
Original file line number Diff line number Diff line change
@@ -76,6 +76,19 @@
</plugins>
</build>
</profile>

<!-- Omit gapic-generator-java results when analyzing showcase test coverage on SonarCloud -->
<profile>
<id>showcase-sonar-analysis</id>
<activation>
<property>
<name>enableTestCoverage</name>
</property>
</activation>
<properties>
<sonar.skip>true</sonar.skip>
</properties>
</profile>
</profiles>

<build>
15 changes: 15 additions & 0 deletions java-common-protos/pom.xml
Original file line number Diff line number Diff line change
@@ -174,4 +174,19 @@
</plugin>
</plugins>
</reporting>

<!-- Omit google-common-protos results when analyzing showcase test coverage on SonarCloud -->
<profiles>
<profile>
<id>showcase-sonar-analysis</id>
<activation>
<property>
<name>enableTestCoverage</name>
</property>
</activation>
<properties>
<sonar.skip>true</sonar.skip>
</properties>
</profile>
</profiles>
</project>
15 changes: 15 additions & 0 deletions java-iam/pom.xml
Original file line number Diff line number Diff line change
@@ -218,4 +218,19 @@
</plugin>
</plugins>
</reporting>

<!-- Omit java-iam results when analyzing showcase test coverage on SonarCloud -->
<profiles>
<profile>
<id>showcase-sonar-analysis</id>
<activation>
<property>
<name>enableTestCoverage</name>
</property>
</activation>
<properties>
<sonar.skip>true</sonar.skip>
</properties>
</profile>
</profiles>
</project>
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -89,6 +89,9 @@
<module>showcase</module>
<module>coverage-report</module>
</modules>
<properties>
<sonar.coverage.jacoco.xmlReportPaths>${maven.multiModuleProjectDirectory}/coverage-report/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
</properties>
</profile>
</profiles>