Files
CPLv4.0/Jenkinsfile
2025-08-28 08:13:53 +02:00

37 lines
893 B
Groovy

pipeline {
agent {
docker {
image 'mcr.microsoft.com/playwright:v1.45.0-jammy'
args '-u root'
}
}
environment {
CI = 'true'
}
stages {
stage('Install dependencies') {
steps {
script {
if (fileExists('package-lock.json')) {
sh 'npm ci'
} else {
sh 'npm install'
}
}
}
}
stage('Run Playwright tests') {
steps {
sh 'npx playwright install'
sh 'npx playwright test || true'
}
}
}
post {
always {
junit 'playwright/test-results/**/*.xml'
archiveArtifacts artifacts: 'playwright/test-results/**', allowEmptyArchive: true
}
}
}