test(frontend): lancement manuel du workflow

This commit is contained in:
ineszang44
2026-09-16 11:22:58 +02:00
parent 11baea7117
commit 596cf43eda
+11 -8
View File
@@ -6,18 +6,15 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
job_choice: job_choice:
type: choice required: true
description: "Choix du job" description: "Choix du job"
type: choice
default: all
options: options:
- build - build
- sonarqube - sonarqube
- test - test
- deploy
- all # lancer tous les jobs - all # lancer tous les jobs
push:
paths:
- "apps/frontend/**"
- ".github/workflows/frontend.yml"
pull_request: pull_request:
paths: paths:
- "apps/frontend/**" - "apps/frontend/**"
@@ -36,12 +33,15 @@ jobs:
with: with:
node-version: 24 node-version: 24
cache: npm cache: npm
cache-dependency-path: apps/frontend/package-lock.json
- run: npm ci - run: npm ci
working-directory: apps/frontend
- run: npm run build - run: npm run build
working-directory: apps/frontend
test: test:
if: ${{ github.event.inputs.job_choice == 'test' || github.event.inputs.job_choice == 'all' }} if: ${{ always() && (github.event.inputs.job_choice == 'test' || github.event.inputs.job_choice == 'all') }}
needs: build needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -50,11 +50,14 @@ jobs:
with: with:
node-version: 24 node-version: 24
cache: npm cache: npm
cache-dependency-path: apps/frontend/package-lock.json
- run: npm ci - run: npm ci
working-directory: apps/frontend
- run: npm test -- --watch=false - run: npm test -- --watch=false
working-directory: apps/frontend
sonarqube: sonarqube:
if: ${{ github.event.inputs.job_choice == 'sonarqube' || github.event.inputs.job_choice == 'all' }} if: ${{ always() && (github.event.inputs.job_choice == 'sonarqube' || github.event.inputs.job_choice == 'all') }}
needs: [build, test] needs: [build, test]
name: SonarQube name: SonarQube
runs-on: ubuntu-latest runs-on: ubuntu-latest