Skip to content

covered missed branch #268

covered missed branch

covered missed branch #268

Workflow file for this run

name: Build
on:
push:
branches: [ "develop", "feature/**", "bugfix/**" ]
env:
EDGE_BINARY: /usr/bin/microsoft-edge
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: mvn install
run: ./mvnw -B install -DallTests -DskipSign -Dmaven.plugin.validation=BRIEF
- name: Generate JaCoCo Badge
id: jacoco
uses: cicirello/jacoco-badge-generator@v2
with:
generate-branches-badge: true
jacoco-csv-file: spectrum/target/site/jacoco/jacoco.csv
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branches = ${{ steps.jacoco.outputs.branches }}"
- name: Commit and push JaCoCo Badge
if: ${{ github.event_name != 'pull_request' }}
run: |
cd .github/badges
if [[ `git status --porcelain *.svg` ]]; then
git push -d origin actions/badges
git checkout -b actions/badges
git config --global user.name 'github-actions'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add *.svg
git commit -m "Autogenerated JaCoCo coverage badge" *.svg
git push --set-upstream origin actions/badges
fi
- name: Upload JaCoCo coverage report
uses: actions/upload-artifact@v3
with:
name: jacoco-report
path: spectrum/target/site/jacoco/