Skip to content

Commit 2abbb2d

Browse files
authored
Merge pull request #9 from devpuppet/feature/update-jenkinsfile
Updated Jenkinsfile to run Jenkins pipeline
2 parents 54a1fb9 + 0b45bdd commit 2abbb2d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Jenkinsfile

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
pipeline {
22
agent {
33
docker {
4-
image 'node:18.18.2-alpine3.18'
4+
image 'mcr.microsoft.com/playwright:v1.34.3-jammy'
55
args '-p 3000:3000 -p 5000:5000 -u root'
66
}
77
}
88
stages {
99
stage('build') {
1010
steps {
11-
sh 'npm install && npm run test:pw'
11+
sh 'PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm install'
12+
}
13+
}
14+
stage('test') {
15+
steps {
16+
sh 'npm run test:pw'
1217
}
1318
}
1419
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"test:pw:debug": "npx playwright test tests/playwright --debug",
1010
"test:pw:record-trace": "npx playwright test tests/playwright --trace on",
1111
"test:pw:ui": "npx playwright test --ui tests/playwright",
12+
"pw:install": "npx playwright install",
1213
"pw:report": "npx playwright show-report",
1314
"compile": "tsc",
1415
"compile:watch": "tsc -w"

playwright.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default defineConfig({
44
testDir: 'tests/playwright',
55
timeout: 2 * 60 * 1000,
66
use: {
7-
headless: false,
7+
headless: true,
88
trace: 'on',
99
screenshot: 'on'
1010
},

0 commit comments

Comments
 (0)