Skip to content

Commit fb31446

Browse files
authored
Merge pull request #12607 from CesiumGS/no-playwright-in-ci
Do not install playwright in CI
2 parents 3c59147 + 87669a3 commit fb31446

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"yargs": "^17.0.1"
105105
},
106106
"scripts": {
107-
"prepare": "gulp prepare && husky && playwright install --with-deps",
107+
"prepare": "gulp prepare && husky && node scripts/isCI.js || playwright install --with-deps",
108108
"start": "node server.js",
109109
"start-public": "node server.js --public",
110110
"build": "gulp build",

scripts/isCI.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Logic and values based on is-ci https://github.com/watson/is-ci/blob/master/bin.js
2+
// which uses ci-info under the hood https://github.com/watson/ci-info/blob/master/index.js
3+
// This just extracts the specific parts we need without adding more dependencies
4+
5+
const { env } = process;
6+
7+
const isCI = !!(
8+
env.CI !== "false" && // Bypass all checks if CI env is explicitly set to 'false'
9+
env.CI // GitHub CI
10+
);
11+
12+
process.exit(isCI ? 0 : 1);

0 commit comments

Comments
 (0)