-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 2.26 KB
/
java.yml
File metadata and controls
73 lines (63 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Copyright © TUM AET 2025 - 2025
#
# Licensed under the MIT License
#
# Authors: Benedikt Hofmann, Patrick Stoeckle, and other contributors
#
# SPDX-FileCopyrightText: 2025 TUM AET
#
# SPDX-License-Identifier: MIT
name: java linting, gradle linting, and jacoco coverage
on:
workflow_call:
env:
BUILD_ROOT: server
jobs:
java:
runs-on: ubuntu-latest
permissions:
# Can read the contents of the repository
contents: read
# Can write to the pull requests in the repository;
# We need this to add the JaCoCo coverage report to the PR
pull-requests: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: burrunan/gradle-cache-action@663fbad34e03c8f12b27f4999ac46e3d90f87eca
name: Check Java files
with:
arguments: check
build-root-directory: ${{ env.BUILD_ROOT }}
save-generated-gradle-jars: true
gradle-version: current
- uses: burrunan/gradle-cache-action@663fbad34e03c8f12b27f4999ac46e3d90f87eca
name: Check build.gradle
with:
arguments: lintGradle
build-root-directory: ${{ env.BUILD_ROOT }}
save-generated-gradle-jars: true
gradle-version: current
- uses: burrunan/gradle-cache-action@663fbad34e03c8f12b27f4999ac46e3d90f87eca
name: Test
with:
arguments: test
build-root-directory: ${{ env.BUILD_ROOT }}
save-generated-gradle-jars: true
gradle-version: current
- uses: burrunan/gradle-cache-action@663fbad34e03c8f12b27f4999ac46e3d90f87eca
name: Generate Test Reports
with:
arguments: jacocoTestReport
build-root-directory: ${{ env.BUILD_ROOT }}
save-generated-gradle-jars: true
gradle-version: current
- name: Add coverage to PR
uses: madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
with:
paths: ${{ github.workspace }}/**/${{ env.BUILD_ROOT }}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
title: JaCoCo Test Coverage Report
update-comment: true
comment-type: both
min-coverage-overall: 5
min-coverage-changed-files: 5