Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
mghilardelli committed Oct 30, 2024
1 parent 56a1b23 commit 7fac33b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 39 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/ci-sfera-mock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,6 @@ jobs:
cache: maven
- name: Run the Maven verify phase
run: mvn --batch-mode --update-snapshots verify
- name: SonarCloud scan for PR
uses: sonarsource/sonarcloud-github-action@383f7e52eae3ab0510c3cb0e7d9d150bbaeab838 # v3
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: sfera-mock
args: |
-Dsonar.pullrequest.base=${{ github.base_ref }}
-Dsonar.pullrequest.branch=${{ github.head_ref }}
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
- name: SonarCloud scan for Push
uses: sonarsource/sonarcloud-github-action@383f7e52eae3ab0510c3cb0e7d9d150bbaeab838 # v3
if: github.event_name == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: sfera-mock
args: |
-Dsonar.branch.name=${{ github.head_ref }}
- name: Login to GitHub Container Registry
if: github.ref == 'refs/heads/main'
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
Expand Down
28 changes: 28 additions & 0 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,34 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<configuration>
<excludes>**/*.jar</excludes>
</configuration>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>package</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<formats>
<format>XML</format>
</formats>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
2 changes: 1 addition & 1 deletion backend/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sonar.host.url=https://sonarcloud.io
# --- optional properties ---

# defaults to project key
sonar.projectName=Backend
sonar.projectName=DAS/backend
# defaults to 'not provided'
#sonar.projectVersion=1.0

Expand Down
16 changes: 0 additions & 16 deletions sfera-mock/sonar-project.properties

This file was deleted.

0 comments on commit 7fac33b

Please sign in to comment.