Skip to content

Instantly share code, notes, and snippets.

@guaracyalima
Created August 16, 2024 03:32
Show Gist options
  • Save guaracyalima/5c9be29b64cbd73fd8d3e1cd3c5098dc to your computer and use it in GitHub Desktop.
Save guaracyalima/5c9be29b64cbd73fd8d3e1cd3c5098dc to your computer and use it in GitHub Desktop.
name: Code Coverage 0th
on:
pull_request:
branches: [ "feature/jacoco" ]
push:
branches: [ "feature/jacoco" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Configurar o repositório
uses: actions/checkout@v3
- name: Configurar JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Instalar dependências
run: ./mvnw install -DskipTests
- name: Compilar o Projeto
run: ./mvnw compile
- name: Executar Testes
run: ./mvnw test
- name: Gerar Relatório de Cobertura com JaCoCo
run: ./mvnw jacoco:report
- name: Publicar Resumo do Relatório de Cobertura
run: echo "## Relatório de Cobertura de Testes\n\n$(cat target/site/jacoco/index.html)" >> $GITHUB_STEP_SUMMARY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment