Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fd428feba | ||
|
|
8fd2f19cce |
@@ -56,27 +56,3 @@ jobs:
|
|||||||
# Le marqueur `integration` est exclu par défaut, donc aucune base n'est nécessaire ici.
|
# Le marqueur `integration` est exclu par défaut, donc aucune base n'est nécessaire ici.
|
||||||
- name: Tests et couverture
|
- name: Tests et couverture
|
||||||
run: uv run pytest --cov-fail-under=85
|
run: uv run pytest --cov-fail-under=85
|
||||||
|
|
||||||
security-audit:
|
|
||||||
name: Audit des dépendances
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: apps/backend
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Récupère le dépôt
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Installe uv
|
|
||||||
uses: astral-sh/setup-uv@v5
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
cache-dependency-glob: apps/backend/uv.lock
|
|
||||||
|
|
||||||
# L'audit porte sur le verrou, pas sur l'environnement : sinon pip-audit auditerait
|
|
||||||
# aussi les paquets que son propre `--with` injecte, hors dépendances du projet.
|
|
||||||
- name: Audite les dépendances livrées
|
|
||||||
# Piège : sans `shell: bash`, un échec de `uv export` serait masqué par le pipe.
|
|
||||||
shell: bash
|
|
||||||
run: uv export --frozen --no-dev --no-emit-project --no-hashes | uvx pip-audit --requirement /dev/stdin --no-deps
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
name: Frontend
|
name: Frontend
|
||||||
|
# Pipeline à choix multiple
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -9,9 +10,9 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- "apps/frontend/**"
|
- "apps/frontend/**"
|
||||||
- ".github/workflows/frontend.yml"
|
- ".github/workflows/frontend.yml"
|
||||||
|
|
||||||
permissions:
|
# Ordre de lancement des jobs
|
||||||
contents: read
|
# build -> test -> sonarqube -> deploy
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -23,25 +24,13 @@ jobs:
|
|||||||
node-version: 24
|
node-version: 24
|
||||||
cache: npm
|
cache: npm
|
||||||
cache-dependency-path: apps/frontend/package-lock.json
|
cache-dependency-path: apps/frontend/package-lock.json
|
||||||
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
working-directory: apps/frontend
|
working-directory: apps/frontend
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
working-directory: apps/frontend
|
working-directory: apps/frontend
|
||||||
|
|
||||||
security-audit:
|
test:
|
||||||
name: Audit des dépendances
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version: 24
|
|
||||||
# Seuil high : une vulnérabilité moderate de devDependency ne doit pas bloquer une livraison.
|
|
||||||
- run: npm audit --audit-level=high --package-lock-only
|
|
||||||
working-directory: apps/frontend
|
|
||||||
|
|
||||||
test:
|
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -51,16 +40,16 @@ jobs:
|
|||||||
node-version: 24
|
node-version: 24
|
||||||
cache: npm
|
cache: npm
|
||||||
cache-dependency-path: apps/frontend/package-lock.json
|
cache-dependency-path: apps/frontend/package-lock.json
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
working-directory: apps/frontend
|
working-directory: apps/frontend
|
||||||
- run: npm test -- --watch=false --coverage
|
- run: npm test --watch=false --code-coverage --coverageReporters=lcov
|
||||||
working-directory: apps/frontend
|
working-directory: apps/frontend
|
||||||
- name: Upload coverage
|
- name: Upload coverage
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: frontend-coverage
|
name: frontend-coverage
|
||||||
path: apps/frontend/coverage/frontend/lcov.info
|
path: apps/frontend/coverage/frontend/lcov.info
|
||||||
|
|
||||||
sonarqube:
|
sonarqube:
|
||||||
needs: [build, test]
|
needs: [build, test]
|
||||||
name: SonarQube
|
name: SonarQube
|
||||||
|
|||||||
Reference in New Issue
Block a user