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.workspace = process.env.GITHUB_WORKSPACE;
exports.folder = core.getInput("FOLDER", { required: true }); exports.folder = core.getInput("FOLDER", { required: true });
exports.root = "."; exports.root = ".";
exports.isTest = process.env.UNIT_TEST;
// Required action data. // Required action data.
exports.action = { exports.action = {
build: exports.folder, build: exports.folder,

View File

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