Workflow triggers are null if unspecified
This commit is contained in:
parent
c0bd7b0b2b
commit
754f502a84
6 changed files with 45 additions and 14 deletions
9
lib/actions-util.test.js
generated
9
lib/actions-util.test.js
generated
|
|
@ -146,6 +146,15 @@ ava_1.default("validateWorkflow() when on.push is mismatched for pull_request",
|
|||
});
|
||||
t.deepEqual(errors, [actionsutil.ErrMismatchedBranches]);
|
||||
});
|
||||
ava_1.default("validateWorkflow() when on.pull_request for every branch but push specifies branches", (t) => {
|
||||
const errors = actionsutil.validateWorkflow({
|
||||
on: {
|
||||
push: { branches: ["main"] },
|
||||
pull_request: null,
|
||||
},
|
||||
});
|
||||
t.deepEqual(errors, [actionsutil.ErrMismatchedBranches]);
|
||||
});
|
||||
ava_1.default("validateWorkflow() when HEAD^2 is checked out", (t) => {
|
||||
const errors = actionsutil.validateWorkflow({
|
||||
on: ["push", "pull_request"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue