Unit tests

This commit is contained in:
James Ives 2019-11-20 09:21:36 -05:00
parent 2b7dae42d4
commit fefb582571
2 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ const { pusher, repository } = github.context.payload;
exports.workspace = process.env.GITHUB_WORKSPACE;
exports.folder = core.getInput("FOLDER", { required: true });
exports.root = ".";
exports.isTest = process.env.UNIT_TEST;
// Required action data.
exports.action = {
build: exports.folder,

View File

@ -103,8 +103,8 @@ function deploy() {
});
}
const hasFilesToCommit = yield util_1.execute(`git status --porcelain`, temporaryDeploymentDirectory);
if (!hasFilesToCommit) {
console.log('There is nothing to commit. Exiting...');
if (!hasFilesToCommit && !constants_1.isTest) {
console.log("There is nothing to commit. Exiting...");
return Promise.resolve();
}
// Commits to GitHub.