ci: Add unit test runner
This commit is contained in:
		
							
								
								
									
										47
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										47
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							@@ -1,24 +1,29 @@
 | 
				
			|||||||
pipeline {
 | 
					pipeline {
 | 
				
			||||||
  agent none
 | 
					  agent none
 | 
				
			||||||
  stages {
 | 
					  stages {
 | 
				
			||||||
 | 
					    stage('Unit Tests') {
 | 
				
			||||||
 | 
					        stage('3.10') {
 | 
				
			||||||
 | 
					          agent {
 | 
				
			||||||
 | 
					            dockerfile {
 | 
				
			||||||
 | 
					              filename 'python310.Dockerfile'
 | 
				
			||||||
 | 
					              dir '.ci'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    stage('GPU') {
 | 
					          }
 | 
				
			||||||
      agent {
 | 
					          steps {
 | 
				
			||||||
        dockerfile {
 | 
					            sh 'pip install pip --upgrade --progress-bar off'
 | 
				
			||||||
          filename 'gpu.Dockerfile'
 | 
					            sh 'pip install .[all] --progress-bar off'
 | 
				
			||||||
          dir '.ci'
 | 
					            sh 'pytest -v --junitxml=reports/result.xml'
 | 
				
			||||||
          args '--gpus 1'
 | 
					          }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        post {
 | 
				
			||||||
 | 
					          always {
 | 
				
			||||||
 | 
					              junit 'reports/**/*.xml'
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      steps {
 | 
					 | 
				
			||||||
        sh 'pip install -U pip --progress-bar off'
 | 
					 | 
				
			||||||
        sh 'pip install .[all] --progress-bar off'
 | 
					 | 
				
			||||||
        sh './tests/test_examples.sh examples --gpu'
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    stage('CPU') {
 | 
					    stage('CPU Examples') {
 | 
				
			||||||
      parallel {
 | 
					      parallel {
 | 
				
			||||||
        stage('3.10') {
 | 
					        stage('3.10') {
 | 
				
			||||||
          agent {
 | 
					          agent {
 | 
				
			||||||
@@ -98,7 +103,21 @@ pipeline {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    stage('GPU Examples') {
 | 
				
			||||||
 | 
					      agent {
 | 
				
			||||||
 | 
					        dockerfile {
 | 
				
			||||||
 | 
					          filename 'gpu.Dockerfile'
 | 
				
			||||||
 | 
					          dir '.ci'
 | 
				
			||||||
 | 
					          args '--gpus 1'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      steps {
 | 
				
			||||||
 | 
					        sh 'pip install -U pip --progress-bar off'
 | 
				
			||||||
 | 
					        sh 'pip install .[all] --progress-bar off'
 | 
				
			||||||
 | 
					        sh './tests/test_examples.sh examples --gpu'
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user