Skip to content

Commit

Permalink
Merge branch 'bcgov:main' into 210-ProofOfConcept
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuber03 authored Jul 21, 2023
2 parents ef1d113 + 0a6132c commit 8e0969d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 10 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn -B package
- name: Analyze with SonarCloud and run tests
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=bcgov_VDYP
run: mvn -Pcoverage package verify
- name: Run Sonar Analysis
run: mvn sonar:sonar
-Pcoverage
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=bcgov-sonarcloud
-Dsonar.projectKey=bcgov_VDYP
env:
GITHUB_TOKEN: ${{ github.token }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
45 changes: 38 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
<junit.version>5.9.2</junit.version>
<hamcrest.version>2.2</hamcrest.version>
<easymock.version>5.1.0</easymock.version>

<sonar.organization>bcgov-sonarcloud</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>


</properties>

<modules>
Expand Down Expand Up @@ -96,7 +93,11 @@
<artifactId>formatter-maven-plugin</artifactId>
<version>2.22.0</version>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.9</version>
</plugin>
</plugins>
</pluginManagement>

Expand All @@ -116,9 +117,39 @@
</execution>
</executions>
</plugin>

</plugins>

</build>

<profiles>
<profile>
<id>coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<formats>
<format>XML</format>
</formats>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 8e0969d

Please sign in to comment.