Skip to content

Commit

Permalink
Add GitHub action to generate code report. Closes #968
Browse files Browse the repository at this point in the history
Signed-off-by: GracianoR <rodrigo.graciano@bnymellon.com>
  • Loading branch information
GracianoR committed Aug 15, 2020
1 parent 6eb479f commit 2347edb
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Coverage Report

on:
schedule:
- cron: '0 0 * * 0'

jobs:
applications:
name: Coverage Report ${{ matrix.java-version }}
strategy:
matrix:
os: [ubuntu-latest]
java-version: [8]

runs-on: ${{ matrix.os }}

env:
JAVA_VERSION: ${{ matrix.java-version }}

steps:
- uses: actions/checkout@v2
- name: Set JDK ${{ matrix.java-version }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: Generate Coverage Report
run: mvn clean verify
- name: Archive Jacoco reports
uses: actions/upload-artifact@v1
with:
name: jacoco-reports
path: test-coverage/target/site/jacoco-aggregate
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -442,11 +442,17 @@
<version>${jacoco.plugin.version}</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>

Expand Down

0 comments on commit 2347edb

Please sign in to comment.