Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/02-tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,24 @@ jobs:
- name: "Checkout do código"
uses: actions/checkout@v4

# INSIRA AQUI A LÓGICA PARA RODAR OS TESTES E VERIFICAR A COBERTURA
###
###
###
- name: "Instalar dependências"
run: |
npm ci

- name: "Executar testes com cobertura"
run: |
npx nyc --reporter=text-summary npm test

- name: "Verificar cobertura mínima"
run: |
COVERAGE=$(npx nyc report --reporter=text-summary | grep -oP 'Statements\\s*:\\s*\\K[0-9\\.]+(?=%)' | head -1)
echo "Cobertura obtida: $COVERAGE%"
if (( $(echo "$COVERAGE < $COVERAGE_MIN" | bc -l) )); then
echo "❌ Cobertura abaixo do mínimo exigido ($COVERAGE_MIN%)"
exit 1
else
echo "✅ Cobertura mínima atingida!"
fi

- name: "Extrair porcentagem de cobertura" # Esse step será validado pelo desafio, não altere o nome. No final, ele deve gerar o output "coverage" com a porcentagem de cobertura.
id: coverage
Expand Down
70 changes: 0 additions & 70 deletions .github/workflows/03-build-containers.yml

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Descomplicando GitHub Actions
DANIELA FOGGIATTO

Se inscreva na aula ao vivo e gratuita: https://quiz.linuxtips.io/github-actions

Expand Down