Running Tests

pull/12/head
Nicolas Arenas 2024-10-23 01:25:14 +02:00
parent 3bb426c6c3
commit 231d729682
1 changed files with 10 additions and 27 deletions

37
Jenkinsfile vendored
View File

@ -59,6 +59,15 @@ pipeline {
sh "docker compose -f ${DOCKER_COMPOSE_FILE} down"
}
}
stage('Tests') {
steps {
// Run tests
sh """
docker compose exec php bin/phpunit --log-junit /report/phpunit.xml
docker compose cp php:/report/phpunit.xml ./phpunit.xml
"""
}
}
stage ("Delete Image") {
steps {
script {
@ -69,33 +78,7 @@ pipeline {
}
}
// stage(('Prepare Docker Composer')) {
// steps {
// sh """
// sed 's|ogcore-php:static|${DOCKER_IDENTITY}|g; s|ogcore-nginx:static|${DOCKER_IDENTITY_NGINX}|g' ${DOCKER_COMPOSE_TEMPLATE} > ${DOCKER_COMPOSE_FILE}
// """
// }
// }
// stage('Run containers') {
// steps {
// sh "docker compose -f ${DOCKER_COMPOSE_FILE} up -d"
// }
// }
// stage('Install dependencies') {
// steps {
// // Install dependencies
// sh """
// docker compose exec php composer install
// docker compose exec php php bin/console lexik:jwt:generate-keypair --overwrite
// docker compose exec php php bin/console doctrine:migrations:migrate --no-interaction
// docker compose exec php php bin/console doctrine:fixtures:load --no-interaction
// // Create report directory
// docker compose exec php mkdir -p /report
// """
// }
// }
// stage('Tests') {
// steps {
// // Run tests