Skip to content

JaCoCo CI check

JaCoCo CI check #2

Workflow file for this run

name: JaCoCo Report
on:
pull_request:
branches: [ master ]
types: [ opened, edited, synchronize, reopened ]
env:
scalaLong: 2.13.11
scalaShort: "2.13"
coverage-overall: 80.0
coverage-changed-files: 80.0
coverage-per-changed-file: 0.0
check-overall-coverages: true
MODULES: |
statusboard-model: model
statusboard-repository: repository
statusboard-utils: utils
statusboard-providers: providers
statusboard-checker: checker
statusboard-api-controllers: api/controllers
statusboard-notification-actioners: notification/actioners
statusboard-notification-deciders: notification/deciders
statusboard-monitoring: monitoring
statusboard-notification: notification
MODULES_THRESHOLDS: |
statusboard-model: 35*80*
statusboard-repository: 35*80*
statusboard-utils: 35*80*
statusboard-providers: 35*80*
statusboard-checker: 35*80*
statusboard-api-controllers: 35*80*
statusboard-notification-actioners: 35*80*
statusboard-notification-deciders: 35*80*
statusboard-monitoring: 35*80*
statusboard-notification: 35*80*
jobs:
jacoco-report:
name: JaCoCo Report
runs-on: ubuntu-latest
steps:
- name: Checkout code
id: code-checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup JVM and SBT
id: jvm-setup
uses: coursier/[email protected]
with:
jvm: corretto:21.0.2.13.1
apps: sbt
- name: Build and run tests with test coverage
id: jacoco-run
continue-on-error: true
run: sbt jacoco
env:
AWS_REGION: "ignored"
AWS_ACCESS_KEY_ID: "ignored"
AWS_SECRET_ACCESS_KEY: "ignored"
- name: Publish JaCoCo Report in PR comments
id: jacoco
uses: MoranaApps/jacoco-report@v2
with:
token: '${{ secrets.GITHUB_TOKEN }}'
paths: |
**/target/**/jacoco/report/jacoco.xml
exclude-paths: |
database/target/**
sensitivity: "detail"
comment-mode: 'multi'
min-coverage-overall: ${{ env.coverage-overall }}
min-coverage-changed-files: ${{ env.coverage-changed-files }}
min-coverage-per-changed-file: ${{ env.coverage-per-changed-file }}
skip-unchanged: false
modules: ${{ env.MODULES }}
modules-thresholds: ${{ env.MODULES_THRESHOLDS }}
jacoco-report-server:
name: JaCoCo Report on Server
runs-on: ubuntu-latest
services:
dynamodb-local:
image: "amazon/dynamodb-local:latest"
ports:
- "8000:8000"
steps:
- name: Checkout code
id: code-checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup JVM and SBT
id: jvm-setup
uses: coursier/[email protected]
with:
jvm: corretto:21.0.2.13.1
apps: sbt
- name: Build and run tests with test coverage
id: jacoco-run
continue-on-error: true
run: sbt jacoco
env:
AWS_REGION: "ignored"
AWS_ACCESS_KEY_ID: "ignored"
AWS_SECRET_ACCESS_KEY: "ignored"
- name: Check coverage thresholds and add reports in PR comments
id: jacoco-report
uses: MoranaApps/jacoco-report@v2
with:
token: '${{ secrets.GITHUB_TOKEN }}'
paths: |
**/target/**/jacoco/report/jacoco.xml
exclude-paths: |
database/target/**
sensitivity: "detail"
comment-mode: 'multi'
min-coverage-overall: ${{ env.coverage-overall }}
min-coverage-changed-files: ${{ env.coverage-changed-files }}
min-coverage-per-changed-file: ${{ env.coverage-per-changed-file }}
skip-unchanged: false
modules: ${{ env.MODULES }}
modules-thresholds: ${{ env.MODULES_THRESHOLDS }}