-
Notifications
You must be signed in to change notification settings - Fork 16
82 lines (76 loc) · 2.85 KB
/
test-pr.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
82
name: PR QA
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Checkout and Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java-version: [8, 11, 17, 21]
steps:
- uses: actions/checkout@v4
- name: JDK setup
uses: actions/setup-java@v4
continue-on-error: true
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
- name: Upload metadata coverage report
if: matrix.java-version == 8
uses: actions/upload-artifact@master
with:
name: metadata-report
path: pdfbox-metadata-fixer/target/site/jacoco/
- name: Upload feature coverage report
if: matrix.java-version == 8
uses: actions/upload-artifact@master
with:
name: feature-report
path: pdfbox-feature-reporting/target/site/jacoco/
- name: Upload validation coverage report
if: matrix.java-version == 8
uses: actions/upload-artifact@master
with:
name: validation-report
path: pdfbox-validation-model/target/site/jacoco/
coverage:
name: Quality Assurance
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v4
- name: Download metadata coverage report
uses: actions/download-artifact@master
with:
name: metadata-report
path: pdfbox-metadata-fixer/target/site/jacoco/
- name: Download feature coverage report
uses: actions/download-artifact@master
with:
name: feature-report
path: pdfbox-feature-reporting/target/site/jacoco/
- name: Download validation coverage report
uses: actions/download-artifact@master
with:
name: validation-report
path: pdfbox-validation-model/target/site/jacoco/
- name: Codecov coverage reporting
uses: codecov/codecov-action@v2
with:
files: pdfbox-metadata-fixer/target/site/jacoco/jacoco.xml, pdfbox-feature-reporting/target/site/jacoco/jacoco.xml, pdfbox-validation-model/target/site/jacoco/jacoco.xml
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
token: ${{ secrets.CODECOV_TOKEN }}
- name: Codacy coverage reporting
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: pdfbox-metadata-fixer/target/site/jacoco/jacoco.xml, pdfbox-feature-reporting/target/site/jacoco/jacoco.xml, pdfbox-validation-model/target/site/jacoco/jacoco.xml
- name: Codacy analysis reporting
uses: codacy/codacy-analysis-cli-action@master