-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare Sonar scan with Jacoco integration
- Loading branch information
1 parent
bb87071
commit a7564d7
Showing
4 changed files
with
115 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,42 @@ | ||
name: Multiapps Maven build | ||
name: Multiapps PR Workflow | ||
|
||
on: | ||
pull_request: | ||
branches: [ master,rel-1.67 ] | ||
branches: [ master ] | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
build: | ||
name: Build and analyze | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
distribution: 'zulu' | ||
|
||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
|
||
- name: Cache Maven packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Build with Maven | ||
run: mvn clean install | ||
- name: Build and Analyze Code Coverage | ||
run: mvn clean install -Pcoverage | ||
|
||
- name: Sonar Scan | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: mvn sonar:sonar -Dsonar.projectKey=cloudfoundry_multiapps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>multiapps-coverage</artifactId> | ||
<packaging>pom</packaging> | ||
<name>MultiApps Coverage</name> | ||
|
||
<parent> | ||
<groupId>org.cloudfoundry.multiapps</groupId> | ||
<artifactId>multiapps-parent</artifactId> | ||
<version>2.17.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>report-aggregate</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>report-aggregate</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<module>multiapps-common</module> | ||
<module>multiapps-common-test</module> | ||
<module>multiapps-mta</module> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.cloudfoundry.multiapps</groupId> | ||
<artifactId>multiapps-common</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.cloudfoundry.multiapps</groupId> | ||
<artifactId>multiapps-common-test</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.cloudfoundry.multiapps</groupId> | ||
<artifactId>multiapps-mta</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters