We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d262151 commit df76a84Copy full SHA for df76a84
pipeline/Jenkinsfile
@@ -0,0 +1,34 @@
1
+pipeline {
2
+ agent any // Run on any available agent
3
+
4
+ stages {
5
+ stage('Checkout Code') {
6
+ steps {
7
+ // Checkout the code from the repository
8
+ checkout scm
9
+ }
10
11
12
+ stage('Set Up Python') {
13
14
+ // Set up Python environment
15
+ sh 'python3 -m venv venv'
16
+ sh '. venv/bin/activate && pip install -r requirements.txt'
17
18
19
20
+ stage('Run Tests') {
21
22
+ // Run pytest and generate HTML report
23
+ sh '. venv/bin/activate && pytest -v -s --html=reports/Test_Execution_Report.html'
24
25
26
27
28
+ post {
29
+ always {
30
+ // Archive test reports
31
+ archiveArtifacts artifacts: 'reports/Test_Execution_Report.html', fingerprint: true
32
33
34
+}
0 commit comments