add sprint05 description on wikiIndex (#46) #172
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java DEV CI | |
on: | |
pull_request: | |
branches: | |
- dev | |
push: | |
branches: | |
- dev | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 8 | |
distribution: temurin | |
- name: Build with Maven | |
run: mvn clean compile | |
- name: Run tests | |
run: mvn test | |
- name: Generate JaCoCo Badge | |
id: jacoco | |
uses: cicirello/jacoco-badge-generator@v2 | |
with: | |
colors: '#4c1 #97ca00 #a4a61d #dfb317 #fe7d37 #e05d44' | |
fail-if-coverage-less-than: 80 | |
generate-workflow-summary: true | |
workflow-summary-heading: JaCoCo Test Coverage Summary | |
generate-coverage-endpoint: true | |
generate-coverage-badge: true | |
coverage-badge-filename: jacoco.svg | |
- name: Log coverage percentage | |
run: | | |
coverage=$(echo "${{ steps.jacoco.outputs.coverage }} * 100" | bc) | |
branches=$(echo "${{ steps.jacoco.outputs.branches }} * 100" | bc) | |
echo "Coverage = ${coverage}%" | |
echo "Branch Coverage = ${branches}%" | |
- name: Upload JaCoCo badge | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jacoco-badge | |
path: .github/badges/jacoco.svg | |
- name: Upload JaCoCo coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jacoco-report | |
path: target/site/jacoco/ | |
- name: commit coverage badge to gh-pages | |
run: | | |
mkdir -p public | |
cp .github/badges/jacoco.svg public/coverage-badge.svg | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
git fetch origin | |
git checkout -b gh-pages origin/gh-pages || git checkout -b gh-pages | |
mv public/* . | |
git add -f coverage-badge.svg | |
git commit -m "Update coverage badge [skip ci]" || echo "No changes to commit" | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install and Run gitinspector | |
run: | | |
pip install git+https://github.com/jpwhite3/gitinspector.git | |
git fetch origin dev | |
git checkout dev | |
echo "git log ..." | |
git log --oneline -n 5 | |
mkdir -p .github/reports | |
gitinspector --format=html --since=2024-01-12 --weeks --list-file-types --timeline > .github/reports/gi-report.html | |
- name: Push coverage badge and gi-report to gh-pages | |
run: | | |
mkdir -p public | |
cp .github/reports/gi-report.html public/gitinspector-report.html | |
git fetch origin | |
git checkout -b gh-pages origin/gh-pages || git checkout -b gh-pages | |
mv public/* . | |
git add -f gitinspector-report.html | |
git commit -m "Update gitInspector-report [skip ci]" || echo "No changes to commit" | |
git push -f origin gh-pages | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} |