Feat CdsDataSourceConfig : default configuration #146
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
name: "Code coverage" | |
on: | |
push: | |
branches: [ "main","develop" ] | |
pull_request: | |
branches: [ "main","develop" ] | |
permissions: # added using https://github.com/step-security/secure-repo | |
checks: write | |
contents: read | |
jobs: | |
jacoco_coverage_report: | |
name: JaCoCo coverage report | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install JDK | |
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: 'maven' | |
- name: Verify Java Installation | |
run: java -version | |
- name: Install Xvfb | |
run: sudo apt-get install -y xvfb | |
- name: Start Xvfb | |
run: | | |
Xvfb :99 -screen 0 1920x1080x24 & | |
echo "DISPLAY=:99" >> $GITHUB_ENV | |
- name: Test | |
run: mvn test -f pom.xml | |
- name: JaCoCo Code Coverage Report | |
id: jacoco_reporter | |
uses: PavanMudigonda/jacoco-reporter@4fc6bf270fe893e8dda5467e432253a6961345b8 # v5.0 | |
with: | |
coverage_results_path: target/site/jacoco/jacoco.xml | |
coverage_report_name: Coverage | |
coverage_report_title: JaCoCo | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
skip_check_run: false | |
minimum_coverage: 80 | |
fail_below_threshold: true | |
publish_only_summary: false | |
- name: Add JaCoCo report to workflow run summary | |
run: | | |
echo "| Outcome | Value |" >> $GITHUB_STEP_SUMMARY | |
echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY | |
echo "| Code Coverage % | ${{ steps.jacoco_reporter.outputs.coverage_percentage }} |" >> $GITHUB_STEP_SUMMARY | |
echo "| :heavy_check_mark: Number of Lines Covered | ${{ steps.jacoco_reporter.outputs.covered_lines }} |" >> $GITHUB_STEP_SUMMARY | |
echo "| :x: Number of Lines Missed | ${{ steps.jacoco_reporter.outputs.missed_lines }} |" >> $GITHUB_STEP_SUMMARY | |
echo "| Total Number of Lines | ${{ steps.jacoco_reporter.outputs.total_lines }} |" >> $GITHUB_STEP_SUMMARY |