|
|
|
@ -5,6 +5,14 @@ const exec = util.promisify(require('child_process').exec);
|
|
|
|
|
// Get items from `git diff develop'
|
|
|
|
|
|
|
|
|
|
void (async () => { |
|
|
|
|
const { stdout: allFileNames } = await exec('git diff --name-only origin/develop'); |
|
|
|
|
// return if no changed file ends with .js
|
|
|
|
|
const testFilesInChangedFiles = allFileNames.split('\n').filter(fileName => fileName.endsWith('.spec.ts')); |
|
|
|
|
if (testFilesInChangedFiles.length === 0) { |
|
|
|
|
console.log('No test file changed, skipping stress test'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const { stdout } = await exec(`git diff origin/develop -- *.spec.ts **/*.spec.ts | grep test\\(`); |
|
|
|
|
// eslint-disable-next-line no-undef
|
|
|
|
|
const dbType = process.env.E2E_DB_TYPE; |
|
|
|
|