Skip to content

Commit

Permalink
Added tests to ghost release process (TryGhost#10613)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rishabhgrg authored and kirrg001 committed Mar 15, 2019
1 parent 8fd2e03 commit 2764ed9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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']);
}
}
);
};
Expand Down

0 comments on commit 2764ed9

Please sign in to comment.