Files
nodeMap/Jenkinsfile
ISA 3bbbfeb872 feat: Add Jenkins integration for testing with pre-push hook
- Configured Jenkins FreeStyle job to trigger on push
- Added `npm install` and `npm test` steps in Jenkins build configuration
- Updated pre-push hook script to trigger Jenkins job and wait for test results
- Installed jest, @testing-library/react, and @testing-library/jest-dom as dev dependencies for testing

This commit sets up automated testing in Jenkins before code is pushed to the remote repository, ensuring code quality and preventing broken builds.
2024-07-10 13:57:28 +02:00

33 lines
690 B
Groovy

pipeline {
agent any
stages {
stage('Install Dependencies') {
steps {
// Installiere npm Abhängigkeiten
sh 'npm install'
}
}
stage('Run Tests') {
steps {
// Führt Ihre Tests aus
sh 'npm test'
}
}
}
post {
always {
// Archivieren Sie die Testberichte, wenn verfügbar
junit '**/test-results.xml'
}
success {
echo 'Die Tests wurden erfolgreich abgeschlossen!'
}
failure {
echo 'Einige Tests sind fehlgeschlagen.'
}
}
}