Skip to content

feat: smart test generation — only modified .kt files + kotlin guard + coverage table#100

Merged
rviannaoliveira merged 3 commits intomainfrom
fix/workflow-printf-and-pat
Mar 29, 2026
Merged

feat: smart test generation — only modified .kt files + kotlin guard + coverage table#100
rviannaoliveira merged 3 commits intomainfrom
fix/workflow-printf-and-pat

Conversation

@rviannaoliveira
Copy link
Copy Markdown
Contributor

Changes

1. Guard de arquivos .kt

Step novo logo após checkout — verifica git diff origin/main...HEAD e pula todo o workflow se nenhum .kt foi modificado. workflow_dispatch sempre passa.

2. Claude API só para .kt modificados no PR

No modo automático (workflow_run), o scan agora filtra apenas os .kt modificados no PR que ainda não têm teste — em vez de processar todos os arquivos sem cobertura. Economiza créditos.

  • workflow_run → só .kt do PR sem teste
  • workflow_dispatch sem override → scan completo
  • workflow_dispatch com override → arquivos informados

3. Branch com auto-incremento

cover/testcover/test-1cover/test-2 (sem non-fast-forward em re-runs)

4. Tabela de evolução de cobertura no PR

Body do PR gerado mostra antes/depois.

5. Correções anteriores

  • printf com variável correta + redirecionamento >> $GITHUB_OUTPUT
  • GH_TOKEN: secrets.GH_PAT (não github.token)
  • Checkout sem token: — autenticação via git remote set-url no push
  • log.txt adicionado ao .gitignore

6. Documentação

claude-doc/step_command_ci_test.md atualizado com todas as armadilhas encontradas e como replicar em outro repo.

@github-actions
Copy link
Copy Markdown
Contributor

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Warnings Elapsed time
⚠️ KOTLIN detekt yes 139 no 4.13s
⚠️ MARKDOWN markdown-table-formatter 22 1 0 0.26s
⚠️ YAML prettier 17 1 4 0.88s

See detailed report in MegaLinter reports

You could have the same capabilities but better runtime performances if you use a MegaLinter flavor:

MegaLinter is graciously provided by OX Security

@rviannaoliveira rviannaoliveira merged commit 0348200 into main Mar 29, 2026
1 of 2 checks passed
@rviannaoliveira rviannaoliveira deleted the fix/workflow-printf-and-pat branch March 29, 2026 14:39
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