mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
parent
939222e53a
commit
d346ebae54
3 changed files with 29 additions and 2 deletions
|
@ -34,6 +34,7 @@ module.exports = function (grunt) {
|
|||
'test:server',
|
||||
'test:jest',
|
||||
'test:jest_integration',
|
||||
'test:projects',
|
||||
'test:browser-ci',
|
||||
'test:api',
|
||||
'verifyTranslations',
|
||||
|
|
|
@ -43,6 +43,7 @@ module.exports = function (grunt) {
|
|||
'test:ui',
|
||||
'test:jest',
|
||||
'test:jest_integration',
|
||||
'test:projects',
|
||||
'test:browser',
|
||||
'test:api'
|
||||
]);
|
||||
|
@ -106,4 +107,31 @@ module.exports = function (grunt) {
|
|||
});
|
||||
|
||||
grunt.registerTask('quick-test', ['test:quick']); // historical alias
|
||||
|
||||
grunt.registerTask('test:projects', function () {
|
||||
const done = this.async();
|
||||
runProjectsTests().then(done, done);
|
||||
});
|
||||
|
||||
function runProjectsTests() {
|
||||
const serverCmd = {
|
||||
cmd: 'yarn',
|
||||
args: ['kbn', 'run', 'test', '--skip-kibana', '--skip-kibana-extra'],
|
||||
opts: { stdio: 'inherit' }
|
||||
};
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
grunt.util.spawn(serverCmd, (error, result, code) => {
|
||||
if (error || code !== 0) {
|
||||
const error = new Error(`projects tests exited with code ${code}`);
|
||||
grunt.fail.fatal(error);
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
grunt.log.writeln(result);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -3,6 +3,4 @@
|
|||
set -e
|
||||
source "$(dirname $0)/../../src/dev/ci_setup/setup.sh"
|
||||
|
||||
yarn kbn run test --skip-kibana --skip-kibana-extra
|
||||
|
||||
xvfb-run "$(yarn bin)/grunt" jenkins:unit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue