diff --git a/Jenkinsfile b/Jenkinsfile index 5b21955c8..febe74dda 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -119,9 +119,6 @@ pipeline { sh "docker-compose ${env.COMPOSE_PARAMS} up -d" } def modules = sh(script: 'node test/cypress/docker/find/find.js', returnStdout: true).trim() - echo env.GIT_COMMIT - echo env.GIT_PREVIOUS_COMMIT - echo env.GIT_BRANCH if (modules == "") { echo "No modules changed. Skipping execution" return diff --git a/test/cypress/docker/find/find.js b/test/cypress/docker/find/find.js index 782444b82..b5dbf4f7b 100644 --- a/test/cypress/docker/find/find.js +++ b/test/cypress/docker/find/find.js @@ -10,9 +10,13 @@ function getGitDiff(options) { } async function getChangedModules() { + const CYPRESS_PATH = 'test/cypress/integration'; + const FINDED_PATHS = ['src', CYPRESS_PATH]; let changedModules = new Set(); const changes = getGitDiff(process.argv); for (const change of changes) { + if (!FINDED_PATHS.some((prefix) => change.startsWith(prefix))) + return CYPRESS_PATH + '/**/*.spec.js'; // all changedModules = new Set([ ...changedModules, ...new Set(getModules(await findImports(change))), @@ -23,6 +27,7 @@ async function getChangedModules() { getChangedModules() .then((modules) => console.log(modules)) // return - .catch(() => { + .catch((e) => { + console.error(e); process.exit(1); });