node { // Utiliser la version spécifique de Node.js définie dans Jenkins tools { nodejs "NodeJS" } stage('Install dependencies') { sh 'npm install --legacy-peer-deps' } stage('Test') { dir("${env.WORKSPACE}/angular-client") { sh 'npm i @angular-devkit/build-angular' try { sh 'npm run test-ci' } catch(err) { sh 'echo TEST FAILED' junit 'target/surefire-reports/TESTS-TestSuite.xml/*.xml' throw err } } } // Autres étapes de construction, déploiement, etc. }