-
Notifications
You must be signed in to change notification settings - Fork 6
81 lines (78 loc) · 2.88 KB
/
maven.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Java CI
on:
push:
branches:
- main
pull_request:
branches: '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- run: rm -rf /tmp/*
continue-on-error: true
- name: Build with Maven
env:
AWS_REGION: us-west-2
run: mvn -ntp -U clean verify
- name: Upload Failed Test Report
uses: actions/[email protected]
if: failure()
with:
name: Failed Test Report
path: target/surefire-reports
- name: Upload Coverage
uses: actions/[email protected]
if: always()
with:
name: Coverage Report
path: target/jacoco-report
- name: Convert Jacoco unit test report to Cobertura
run: python3 .github/scripts/cover2cover.py target/jacoco-report/jacoco.xml src/main/java > target/jacoco-report/cobertura.xml
- name: Convert Jacoco interation test report to Cobertura
run: python3 .github/scripts/cover2cover.py target/jacoco-report/jacoco-it/jacoco.xml src/main/java > target/jacoco-report/cobertura-it.xml
- name: cobertura-report-unit-test
uses: shaguptashaikh/cobertura-action@master
continue-on-error: true
with:
# The GITHUB_TOKEN for this repo
repo_token: ${{ github.token }}
# Path to the cobertura file.
path: target/jacoco-report/cobertura.xml
# If files with 100% should be skipped from report.
skip_covered: false
# Minimum allowed coverage percentage as an integer.
minimum_coverage: 65
# Show line rate as specific column.
show_line: true
# Show branch rate as specific column.
show_branch: true
# Use class names instead of the filename
show_class_names: true
# Use a unique name for the report and comment
report_name: Unit Tests Coverage Report
- name: cobertura-report-integration-test
uses: shaguptashaikh/cobertura-action@master
continue-on-error: true
with:
# The GITHUB_TOKEN for this repo
repo_token: ${{ github.token }}
# Path to the cobertura file.
path: target/jacoco-report/cobertura-it.xml
# If files with 100% should be skipped from report.
skip_covered: false
# Minimum allowed coverage percentage as an integer.
minimum_coverage: 45
# Show line rate as specific column.
show_line: true
# Show branch rate as specific column.
show_branch: true
# Use class names instead of the filename
show_class_names: true
# Use a unique name for the report and comment
report_name: Integration Tests Coverage Report