Skip to content

Merge pull request #10 from sfuhrm/dependabot/maven/sudoku-output/org… #49

Merge pull request #10 from sfuhrm/dependabot/maven/sudoku-output/org…

Merge pull request #10 from sfuhrm/dependabot/maven/sudoku-output/org… #49

Workflow file for this run

name: Coverage
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 8
- name: Build with Maven
run: mvn -B test
- name: Generate JaCoCo Badge
id: jacoco
uses: cicirello/[email protected]
with:
jacoco-csv-file: >
./sudoku/target/site/jacoco/jacoco.csv
./sudoku-output/target/site/jacoco/jacoco.csv
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Commit the badge (if it changed)
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name 'sfuhrm'
git config --global user.email '[email protected]'
git add -A
git commit -m "Autogenerated JaCoCo coverage badge"
git push
fi
- name: Upload JaCoCo coverage report
uses: actions/upload-artifact@v2
with:
name: jacoco-report
path: ./sudoku/target/site/jacoco/