Skip to content

Commit

Permalink
Jacoco-report
Browse files Browse the repository at this point in the history
  • Loading branch information
stigebil committed Sep 19, 2024
1 parent faa0abb commit 9dba727
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-and-deploy-preprod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
permissions:
contents: "read"
id-token: "write"
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -24,6 +25,15 @@ jobs:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B --no-transfer-progress package verify --settings .m2/maven-settings.xml --file pom.xml
- name: Add coverage to PR
id: jacoco
uses: madrapps/[email protected]
with:
paths: ${{ github.workspace }}/target/site/jacoco/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 70
min-coverage-changed-files: 70
title: Code Coverage
- uses: nais/docker-build-push@v0
id: docker-push
if: github.event.pull_request.user.login != 'dependabot[bot]'
Expand Down
25 changes: 25 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,31 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<configuration>
<excludes>
<exclude>**/*config.*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 9dba727

Please sign in to comment.