Skip to content

ci: add the check, security and codeql workflows and dependabot - #1

Merged
kevpdev merged 5 commits into
mainfrom
ci/ci-starter-recipe
Oct 8, 2026
Merged

kevpdev merged 5 commits into
mainfrom
ci/ci-starter-recipe

Conversation

@kevpdev

@kevpdev kevpdev commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Pourquoi

Application du contrat CI de agent-config (rules/references/ref-ci-github.md) à un projet Java, pour valider la fiche sur une stack autre que Python (kevpdev/yt-transcriber#40).

Changements

  • Jobs check (sh ./mvnw -B verify, Java 21 Temurin, cache Maven), security (Trivy), codeql (java-kotlin) et codeql (actions) non requis. Dependabot sur github-actions et maven. Actions épinglées par SHA.
  • verify couvre maintenant le format, le lint, l'analyse statique et la couverture, dans l'ordre : Spotless et Checkstyle (google_checks.xml) en validate, PMD et SpotBugs après la compilation, JaCoCo (seuil 40 % de lignes) en verify.
  • Quatre commits : l'ajout de la CI, le reformatage seul (chore(format), 24 fichiers, sans changement de comportement), les corrections des violations, puis l'ajout des plugins.

Mesuré

  • Avant : mvnw verify donnait 12 tests, BUILD SUCCESS. Couverture de lignes mesurée à 43 %, d'où le seuil à 40 %.
  • Checkstyle google_checks.xml : 103 violations au départ. Les règles Javadoc, le suffixe DTO dans les noms et les noms de test should_..._when_... sont supprimés dans config/checkstyle-suppressions.xml. Le reste est corrigé (imports explicites, champs de SearchResultDTO privés derrière les accesseurs Lombok, méthode customOpenApi).
  • PMD : zéro violation, calibré avec un champ privé inutilisé et un catch vide plantés, qu'il détecte. SpotBugs : 4 alertes au départ (champs publics de SearchResultDTO), 0 après correction.
  • Le seuil JaCoCo est bloquant : un minimum de 0,99 fait échouer jacoco:check (couverture 0,43).
  • CI : check passe en 1 min 07.

À savoir

Le nom du bean customOpenAPI devient customOpenApi : aucune référence dans le dépôt.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Explicit imports, private SearchResultDTO fields behind the Lombok accessors,
customOpenApi bean method name, javadoc tag order and TODO comment format.
Spotless and Checkstyle (google_checks) run in validate, PMD and SpotBugs after
compile, JaCoCo checks 40 percent of lines at verify. Measured coverage is 43 percent.
@kevpdev
kevpdev marked this pull request as ready for review October 8, 2026 08:51
@kevpdev
kevpdev merged commit 422187f into main Oct 8, 2026
7 checks passed
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.

2 participants