diff --git a/package.json b/package.json index ebd10d7099..50d23912e0 100644 --- a/package.json +++ b/package.json @@ -93,8 +93,7 @@ "test": "npm run test-lint && npm run test-unit", "test-integration": "jest \".integ\\.spec\\.js$\"", "test-lint": "eslint --ignore-path .gitignore --ignore-pattern packages/xo-web .", - "test-unit": "jest \"^(?!.*\\.integ\\.spec\\.js$)\" && scripts/run-script.js --bail test", - "travis-tests": "scripts/travis-tests.js" + "test-unit": "jest \"^(?!.*\\.integ\\.spec\\.js$)\" && scripts/run-script.js --bail test" }, "workspaces": [ "@*/*", diff --git a/scripts/travis-tests.js b/scripts/travis-tests.js deleted file mode 100755 index bec5d31676..0000000000 --- a/scripts/travis-tests.js +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env node - -'use strict' - -const { execFileSync, spawnSync } = require('child_process') - -const run = (command, args) => spawnSync(command, args, { stdio: 'inherit' }).status - -const getFiles = () => - execFileSync('git', ['diff-index', '--diff-filter=AM', '--ignore-submodules', '--name-only', 'master'], { - encoding: 'utf8', - }) - .split('\n') - .filter(_ => _ !== '') - -// ----------------------------------------------------------------------------- - -// Travis vars : https://docs.travis-ci.com/user/environment-variables#default-environment-variables. -if (process.env.TRAVIS_PULL_REQUEST !== 'false') { - const files = getFiles().filter(_ => _.endsWith('.cjs') || _.endsWith('.js') || _.endsWith('.mjs')) - if (files.length !== 0) { - process.exit(run('./node_modules/.bin/jest', ['--findRelatedTests', '--passWithNoTests'].concat(files))) - } -} else { - process.exit(run('yarn', ['test-lint']) + run('yarn', ['test-unit']) + run('yarn', ['test-integration'])) -}