feat(travis-tests): dont stop on first failure on master
This commit is contained in:
parent
14c3fa4378
commit
12c774a34a
@ -73,11 +73,11 @@
|
||||
"dev-test": "jest --bail --watch \"^(?!.*\\.integ\\.spec\\.js$)\"",
|
||||
"docs:dev": "vuepress dev docs",
|
||||
"docs:build": "vuepress build docs",
|
||||
"posttest": "scripts/run-script test",
|
||||
"pretest": "eslint --ignore-path .gitignore .",
|
||||
"prettify": "prettier --ignore-path .gitignore --write '**/*.{js,jsx,md,mjs,ts,tsx}'",
|
||||
"test": "jest \"^(?!.*\\.integ\\.spec\\.js$)\"",
|
||||
"test": "npm run test-lint && npm run test-unit",
|
||||
"test-integration": "jest \".integ\\.spec\\.js$\"",
|
||||
"test-lint": "eslint --ignore-path .gitignore .",
|
||||
"test-unit": "jest \"^(?!.*\\.integ\\.spec\\.js$)\" && scripts/run-script test",
|
||||
"travis-tests": "scripts/travis-tests"
|
||||
},
|
||||
"workspaces": [
|
||||
|
@ -2,12 +2,8 @@
|
||||
|
||||
const { execFileSync, spawnSync } = require('child_process')
|
||||
|
||||
const run = (command, args) => {
|
||||
const { status } = spawnSync(command, args, { stdio: 'inherit' })
|
||||
if (status !== 0) {
|
||||
process.exit(status)
|
||||
}
|
||||
}
|
||||
const run = (command, args) =>
|
||||
spawnSync(command, args, { stdio: 'inherit' }).status
|
||||
|
||||
const getFiles = () =>
|
||||
execFileSync(
|
||||
@ -30,12 +26,17 @@ const getFiles = () =>
|
||||
if (process.env.TRAVIS_PULL_REQUEST !== 'false') {
|
||||
const files = getFiles().filter(_ => _.endsWith('.js'))
|
||||
if (files.length !== 0) {
|
||||
run(
|
||||
'./node_modules/.bin/jest',
|
||||
['--findRelatedTests', '--passWithNoTests'].concat(files)
|
||||
process.exit(
|
||||
run(
|
||||
'./node_modules/.bin/jest',
|
||||
['--findRelatedTests', '--passWithNoTests'].concat(files)
|
||||
)
|
||||
)
|
||||
}
|
||||
} else {
|
||||
run('yarn', ['test'])
|
||||
run('yarn', ['test-integration'])
|
||||
process.exit(
|
||||
run('yarn', ['test-lint']) +
|
||||
run('yarn', ['test-unit']) +
|
||||
run('yarn', ['test-integration'])
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user