-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathJenkinsFile
31 lines (26 loc) · 837 Bytes
/
JenkinsFile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
pipeline {
agent any
environment {
NODE_HOME = tool name: 'nodejs', type: 'NodeJS' // This must match the name in Global Tool Configuration
PATH = "${NODE_HOME}/bin:${env.PATH}"
}
stages {
stage('Check Node.js Version') {
steps {
sh 'node -v' // Verify the Node.js version
sh 'npm -v' // Verify the npm version
}
}
stage('Install Dependencies') {
steps {
sh 'npm ci'
sh 'npx playwright install --with-deps'
}
}
stage('Run Playwright Tests') {
steps {
sh 'npx playwright test --grep PlaywrightWithJenkins' // You can specify browsers or configurations
}
}
}
}