test: jenkinsfile
This commit is contained in:
30
Jenkinsfile
vendored
30
Jenkinsfile
vendored
@@ -1,36 +1,16 @@
|
||||
pipeline {
|
||||
agent {
|
||||
docker {
|
||||
image 'mcr.microsoft.com/playwright:v1.45.0-jammy'
|
||||
args '-u root'
|
||||
}
|
||||
}
|
||||
environment {
|
||||
CI = 'true'
|
||||
}
|
||||
agent any
|
||||
stages {
|
||||
stage('Install dependencies') {
|
||||
steps {
|
||||
script {
|
||||
if (fileExists('package-lock.json')) {
|
||||
sh 'npm ci'
|
||||
} else {
|
||||
sh 'npm install'
|
||||
}
|
||||
}
|
||||
bat 'npm ci'
|
||||
}
|
||||
}
|
||||
stage('Run Playwright tests') {
|
||||
steps {
|
||||
sh 'npx playwright install'
|
||||
sh 'npx playwright test || true'
|
||||
bat 'npx playwright install'
|
||||
bat 'npx playwright test'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit 'playwright/test-results/**/*.xml'
|
||||
archiveArtifacts artifacts: 'playwright/test-results/**', allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user