Skip to content

chore(ci): adicionar pipeline de release e melhorar quality gate#15

Merged
diego64 merged 1 commit into
mainfrom
feature/fase-10-cicd
Jun 7, 2026
Merged

chore(ci): adicionar pipeline de release e melhorar quality gate#15
diego64 merged 1 commit into
mainfrom
feature/fase-10-cicd

Conversation

@diego64

@diego64 diego64 commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add dedicated build job as the first step in the pipeline chain (build → qualidade → testes-unitarios → testes-e2e → cobertura)
  • Add concurrency block to auto-cancel duplicate runs for the same PR, preserving independent runs on main
  • Add timeout-minutes: 10 to every job to prevent runaway builds
  • Rename cobertura job to "Cobertura e Quality Gate" — Vitest's --coverage now enforces the 80% threshold natively (lines, functions, branches, statements), failing the pipeline when not met
  • Upload the coverage HTML report as a GitHub Actions artifact (relatorio-cobertura-<run_number>, 7-day retention) with if: always() so it's available even on threshold failures
  • Add statements: 80 to vitest.config.ts coverage thresholds (the other three dimensions were already configured)
  • Create .github/workflows/release.yml triggered by v*.*.* tags with the full release pipeline:
    • build → qualidade → testes-unitarios → testes-e2e → cobertura → security-scan → artifact-build → aprovacao-producao
    • security-scan: pnpm audit --audit-level=high — fails on high/critical vulnerabilities
    • artifact-build: production-only install (--prod), compiled dist/ uploaded as dist-<tag> with 30-day retention
    • aprovacao-producao: uses environment: producao for manual approval gate before the release is considered done

Test plan

  • Push a commit to a PR branch and confirm the build job runs before qualidade
  • Confirm concurrent PR pushes cancel the previous run (check Actions tab)
  • Verify pnpm test:coverage fails the cobertura job when coverage drops below 80%
  • Confirm the coverage artifact appears in the run summary even on failure
  • Push a v*.*.* tag and verify the full release pipeline triggers
  • Confirm pnpm audit blocks the pipeline on known high/critical vulnerabilities
  • Confirm aprovacao-producao pauses for manual approval (requires the producao environment configured in Settings > Environments)

Configuration required

To activate the manual approval gate in release.yml, create the environment in the repository:
Settings → Environments → New environment → name: producao → add Required reviewers

🤖 Generated with Claude Code

- adiciona job build como primeiro da cadeia em ci.yml
- adiciona concurrency para cancelar runs anteriores do mesmo PR
- adiciona timeout-minutes: 10 em todos os jobs
- quality gate explicito via thresholds do Vitest no job cobertura
- upload do relatorio de cobertura como artifact (retencao 7 dias)
- cria release.yml: pipeline por tags v*.*.* com security scan
- aprovacao manual via environment producao no release
- adiciona threshold statements: 80 no vitest.config.ts
@gitguardian

gitguardian Bot commented Jun 7, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
33202264 Triggered Username Password f2b8034 .github/workflows/release.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@diego64 diego64 merged commit 6245500 into main Jun 7, 2026
3 of 4 checks passed
@diego64 diego64 deleted the feature/fase-10-cicd branch June 7, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant