Repository navigation
138 lines (123 loc) · 3.77 KB
/
Copy pathjacoco_report.yml
File metadata and controls
138 lines (123 loc) · 3.77 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#
# Copyright 2021 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: CI JaCoCo Report
on:
pull_request:
branches: [ master ]
permissions:
contents: read
# Cancel superseded runs on the same ref to save runner minutes.
concurrency:
group: jacoco-report-${{ github.ref }}
cancel-in-progress: true
env:
# hint: "group thresholds" are in format: 'overall*changed-files-average*per-changed-file'
REPORT_GROUPS: |
- name: atum-agent
paths:
- '**/agent/target/**/jacoco-report/jacoco.xml'
thresholds: '78*80*60'
- name: atum-reader
paths:
- '**/reader/target/**/jacoco-report/jacoco.xml'
thresholds: '74*80*60'
- name: atum-model
paths:
- '**/model/target/**/jacoco-report/jacoco.xml'
thresholds: '34*80*60'
- name: atum-server
paths:
- '**/server/target/**/jacoco-report/jacoco.xml'
thresholds: '78*80*60'
jobs:
detect:
name: Detect Changed Files
runs-on: ubuntu-22.04
timeout-minutes: 2
outputs:
scala_changed: ${{ steps.filter.outputs.scala }}
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
fetch-depth: 0
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d
id: filter
with:
token: ""
filters: |
scala:
- '**/*.scala'
- '!project/**'
jacoco-report:
name: JaCoCo Report
needs: detect
if: needs.detect.outputs.scala_changed == 'true'
runs-on: ubuntu-22.04
permissions:
contents: read
issues: write
pull-requests: write
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: changeme
POSTGRES_DB: atum_db
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
fetch-depth: 0
- name: Setup JDK 11
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: temurin
java-version: '11'
- name: Prepare testing database
run: sbt flywayMigrate
- name: Build and run tests with coverage
continue-on-error: true
run: sbt jacoco
- name: Setup Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
with:
python-version: '3.14'
- name: Add JaCoCo Report in PR comments
uses: MoranaApps/jacoco-report@3575c005e31adda0bf6868b69d48a0114e912845
with:
token: ${{ secrets.GITHUB_TOKEN }}
global-thresholds: '64*80'
report-thresholds-default: '34*80*60'
skip-unchanged: 'true'
evaluate-unchanged: 'false'
report-groups: ${{ env.REPORT_GROUPS }}
noop:
name: No Operation
needs: detect
if: needs.detect.outputs.scala_changed != 'true'
runs-on: ubuntu-22.04
steps:
- run: echo "No changes in Scala related files — passing."