|
|
@ -5,6 +5,14 @@ const exec = util.promisify(require('child_process').exec); |
|
|
|
// Get items from `git diff develop'
|
|
|
|
// Get items from `git diff develop'
|
|
|
|
|
|
|
|
|
|
|
|
void (async () => { |
|
|
|
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\\(`); |
|
|
|
const { stdout } = await exec(`git diff origin/develop -- *.spec.ts **/*.spec.ts | grep test\\(`); |
|
|
|
// eslint-disable-next-line no-undef
|
|
|
|
// eslint-disable-next-line no-undef
|
|
|
|
const dbType = process.env.E2E_DB_TYPE; |
|
|
|
const dbType = process.env.E2E_DB_TYPE; |
|
|
|