mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-11 13:48:37 +02:00
Create measure_coverage.yml
This commit is contained in:
parent
da847b4892
commit
87c2d024bd
50
.github/workflows/measure_coverage.yml
vendored
Normal file
50
.github/workflows/measure_coverage.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
name: Measure coverage
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
jdk-version: [17, 21]
|
||||||
|
spring-security: [true, false]
|
||||||
|
steps:
|
||||||
|
- name: Harden Runner
|
||||||
|
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
|
||||||
|
with:
|
||||||
|
egress-policy: audit
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
|
- name: Set up JDK ${{ matrix.jdk-version }}
|
||||||
|
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.jdk-version }}
|
||||||
|
distribution: "temurin"
|
||||||
|
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||||
|
with:
|
||||||
|
gradle-version: 8.14
|
||||||
|
|
||||||
|
- name: Run Coverage
|
||||||
|
run: ./gradlew jacocoTestReport jacocoTestCoverageVerification
|
||||||
|
env:
|
||||||
|
DISABLE_ADDITIONAL_FEATURES: ${{ matrix.spring-security }}
|
||||||
|
|
||||||
|
- name: Add coverage to PR with spring security ${{ matrix.spring-security }}
|
||||||
|
id: jacoco
|
||||||
|
uses: madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848 # v1.7.2
|
||||||
|
with:
|
||||||
|
paths: |
|
||||||
|
${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml,
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
min-coverage-overall: 10
|
||||||
|
min-coverage-changed-files: 0
|
Loading…
Reference in New Issue
Block a user