pipeline {
    agent any

    stages {
        stage('Checkout') {
            steps {
                // Checkout code from version control
                git 'https://gitea.zacksolutions.dev/Zakaria/ZenProject.git'
            }
        }

        stage('Build') {
            steps {
                // Build your project (if needed)
                sh 'mvn clean install'
            }
        }

        stage('Test') {
            steps {
                // Install dependencies
                sh 'mvn dependency:resolve'

                // Run browser tests
                sh 'mvn test'
            }
        }

        stage('Generate Reports') {
            steps {
                // Generate and store test reports
                sh 'mvn site'
            }
        }
    }
}
