Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroGlezC authored Apr 23, 2024
1 parent 4158757 commit a09a76f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,27 @@ jobs:
run: |
mkdir -p coverage
cp -r SYG-bootstrap/target/site/jacoco-aggregate/* coverage/
- name: Hacer commit y push de la cobertura
run: |
git add coverage
git commit -m "Agregar reporte de cobertura"
git push
- name: Obtener cobertura
id: obtener-cobertura
run: |
cobertura=$(awk '/^TOTAL/{print $NF}' SYG-bootstrap/target/site/jacoco/index.html)
echo "::set-output name=cobertura::$cobertura"
- name: Generar badge de cobertura
run: |
curl -o backend-coverage-badge.svg "https://img.shields.io/badge/backend%20cobertura-${{ steps.obtener-cobertura.outputs.cobertura }}%25-green"
- name: Guardar badge en el repositorio
run: |
git add backend-coverage-badge.svg
git commit -m "Agregar badge de cobertura del backend"
git push

0 comments on commit a09a76f

Please sign in to comment.