From 2764ed9ee329fabd2734ae9ca7b92d5806a573a8 Mon Sep 17 00:00:00 2001 From: Rishabh Garg Date: Fri, 15 Mar 2019 15:58:22 +0530 Subject: [PATCH] Added tests to ghost release process (#10613) no issue - acceptance tests run on each build - regression tests run once per day - if we do a release, we have to ensure that we run all tests - reduces the risk of releasing a new version with broken regression tests --- Gruntfile.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 8a02d280c810..911dae6347b4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -639,6 +639,7 @@ const configureGrunt = function (grunt) { grunt.registerTask('release', 'Release task - creates a final built zip\n' + ' - Do our standard build steps \n' + + ' - Run all tests(acceptance + regression + unit) \n' + ' - Copy files to release-folder/#/#{version} directory\n' + ' - Clean out unnecessary files (travis, .git*, etc)\n' + ' - Zip files in release-folder to dist-folder/#{version} directory', @@ -662,8 +663,14 @@ const configureGrunt = function (grunt) { dest: 'core/server/web/admin/views/default.html' }] }); - - grunt.task.run(['update_submodules:pinned', 'subgrunt:init', 'clean:built', 'clean:tmp', 'prod', 'clean:release', 'copy:admin_html', 'copy:release', 'compress:release']); + if (!grunt.option('skip-tests')) { + grunt.task.run(['update_submodules:pinned', 'subgrunt:init', 'test-all', 'clean:built', 'clean:tmp', 'prod', 'clean:release', 'copy:admin_html', 'copy:release', 'compress:release']); + } else { + grunt.log.writeln(chalk.red( + chalk.bold('Skipping tests...') + )); + grunt.task.run(['update_submodules:pinned', 'subgrunt:init', 'clean:built', 'clean:tmp', 'prod', 'clean:release', 'copy:admin_html', 'copy:release', 'compress:release']); + } } ); };