generated from leanix/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.47 KB
/
leanix-github-agent-code-coverage.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
name: leanix-github-agent-code-coverage
concurrency:
group: leanix-github-agent-code-coverage-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches:
- main
jobs:
leanix-github-agent-connector-ci:
name: Build and test LeanIX GitHub Agent
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: LeanIX Secrets 🔒
uses: leanix/secrets-action@master
with:
secret-store-credentials: ${{ secrets.INJECTED_SECRET_STORE_CREDENTIALS }}
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
id: gradle-build
continue-on-error: false
with:
arguments: build
build-root-directory: .
- name: Add coverage to PR
id: jacoco
uses: madrapps/jacoco-report@v1.3
with:
paths: ${{ github.workspace }}/build/jacocoXml/jacocoTestReport.xml
token: ${{secrets.GITHUB_TOKEN}}
min-coverage-overall: 40
min-coverage-changed-files: 60
title: LeanIX GitHub Agent Code Coverage
update-comment: true
- name: Get the Coverage info
run: |
echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}"
echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"