-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (34 loc) · 1.16 KB
/
test.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
name: APIM ENV CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'zulu'
- name: Build with Maven
run: mvn verify
- name: jacoco-badge-generator
uses: cicirello/[email protected]
- name: Log coverage percentages to workflow output
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branches = ${{ steps.jacoco.outputs.branches }}"
- name: Upload JaCoCo coverage report as a workflow artifact
uses: actions/upload-artifact@v2
with:
name: jacoco-report
path: target/site/jacoco/
- name: Commit and push the coverage badges and summary file
run: |
if [[ `git status --porcelain *.svg *.json` ]]; then
git config --global user.name 'rathnapandi'
git config --global user.email '[email protected]'
git add -A
git commit -m "Autogenerated JaCoCo coverage badges badge"
git push
fi