Skip to content

Update test.yml

Update test.yml #105

Workflow file for this run

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/jacoco-badge-generator@v2.5.0
- 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 'rathnapandi.n@gmail.com'
git add -A
git commit -m "Autogenerated JaCoCo coverage badges badge"
git push
fi