-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (55 loc) · 1.88 KB
/
aam-backend-service-analyse.yml
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
name: aam-backend-service-analyse
on:
push:
branches:
- main
paths:
- '.github/workflows/aam-backend-service-analyse.yml'
- 'application/aam-backend-service/**'
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
jobs:
test_coverage:
name: Run tests and coverage calculation
runs-on: ubuntu-latest
permissions:
packages: read
defaults:
run:
working-directory: application/aam-backend-service
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 17
cache: 'gradle'
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PULL_SECRET }}
- name: Run Tests and generate Jacoco Test Report
env:
JACOCO_SOURCE_PATH: application/aam-backend-service/src/main/kotlin
run: |
./gradlew jacocoTestReport --no-daemon
- name: Publish code coverage to code climate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
JACOCO_SOURCE_PATH: application/aam-backend-service/src/main/kotlin
with:
coverageLocations: application/aam-backend-service/build/reports/jacoco/test/jacocoTestReport.xml:jacoco
- name: Add code coverage to PR
uses: madrapps/[email protected]
with:
paths: application/aam-backend-service/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
title: Code Coverage Analyse
update-comment: true