Skip to content

chore(ci): improve and modernize workflow#1217

Merged
ronycohen merged 29 commits into
developfrom
chore/improve-main-workflow
May 15, 2026
Merged

chore(ci): improve and modernize workflow#1217
ronycohen merged 29 commits into
developfrom
chore/improve-main-workflow

Conversation

@ronycohen
Copy link
Copy Markdown
Collaborator

@ronycohen ronycohen commented Apr 24, 2026

Résumé exécutif

Cette PR remet en fonctionnement et fiabilise la CI/CD de Cohort360-FrontEnd, puis adapte le workflow de publication au nouveau modèle de release basé sur des branches release/* plutôt que sur des tags Git.

Principaux changements

  • modernisation du workflow GitHub Actions (pull_request, workflow_dispatch, permissions minimales, concurrency)
  • séparation de la CI en jobs lisibles : lint, typecheck, tests, sonar, publish
  • passage à npm ci et resynchronisation du package-lock.json
  • mise à jour des actions GitHub/Docker vers des versions compatibles Node 24
  • partage des artefacts de couverture entre tests et sonar
  • correction de la remontée de version Sonar
  • suppression du tag technique run-sonar et des variables SONAR_TEST_*; les runs manuels passent par workflow_dispatch
  • publication Docker sur main et sur les branches release/*
  • remplacement du contrôle tag Git/version par un contrôle branche release/X.Y.Z/version package.json
  • suppression de la création et du push de tag Git dans scripts/createReleaseCommit.sh
  • ajout d'une garde dans scripts/createReleaseCommit.sh pour exécuter le script uniquement depuis release/$VERSION
  • correction des findings Sonar de la PR : remplacement de npx tsc par le binaire local verrouillé et usage de [[ ... ]] dans les scripts bash

Impact release

  • le flux cible devient develop -> feature/*, feature/* -> develop, develop -> release/*, puis release/* -> main
  • les branches Git de release portent le format release/X.Y.Z
  • le tag utilisé dans /ops reste le tag d'image Docker X.Y.Z, pas un tag Git
  • le job publish refuse une branche release/* si son suffixe ne correspond pas à la version de package.json
  • les versions SNAPSHOT ne sont pas publiées depuis les branches release/*

Validations réalisées

  • bash -n scripts/createReleaseCommit.sh : OK
  • parsing YAML de .github/workflows/main.yml via Node yaml : OK
  • git diff --check -- .github/workflows/main.yml scripts/createReleaseCommit.sh : OK
  • ./node_modules/.bin/tsc --noEmit : OK
  • CI branche : OK avant le dernier ajustement, relancée après push
  • Sonar : Quality Gate OK avant le dernier ajustement, relancé après suppression du tag technique
  • import de la couverture LCOV dans Sonar : OK avant le dernier ajustement
  • publication Docker sur tag : OK, remplacée dans cette PR par publication sur branche release/*
  • suppression des warnings Node 20/24 sur les actions critiques traitées : OK

Points restant hors workflow

  • warnings lint applicatifs
  • dette Sonar historique (bugs, vulnérabilités, hotspots, couverture)
  • alertes Dependabot existantes sur la branche par défaut

#3220

@ronycohen ronycohen requested a review from cesar-richard April 24, 2026 15:41
@ronycohen ronycohen changed the title Stabilize and modernize CI/CD workflow chore(ci): stabilize and modernize workflow Apr 24, 2026
@ronycohen ronycohen changed the title chore(ci): stabilize and modernize workflow chore(ci): improve and modernize workflow Apr 24, 2026
Comment thread package-lock.json
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Fixed
Comment thread .github/workflows/main.yml Fixed
Comment thread .github/workflows/main.yml Fixed
Comment thread .github/workflows/main.yml Outdated
Comment thread scripts/createReleaseCommit.sh
Comment thread package-lock.json
…-workflow

# Conflicts:
#	.github/workflows/main.yml
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@ronycohen
Copy link
Copy Markdown
Collaborator Author

A voir si on cloture suite aux derniers changements sur le sujet.

run: npm ci --no-audit --ignore-scripts

- name: Type-check
run: npx tsc --noEmit
run: npm ci --no-audit --ignore-scripts

- name: Type-check
run: npx tsc --noEmit
workflow_dispatch:

permissions:
contents: read
@ronycohen ronycohen merged commit 4a8a2b9 into develop May 15, 2026
9 of 14 checks passed
@ronycohen ronycohen deleted the chore/improve-main-workflow branch May 15, 2026 07:46
@ronycohen ronycohen restored the chore/improve-main-workflow branch May 15, 2026 10:55
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.

3 participants