Only report the first CheckoutWrongHead lint error
This commit is contained in:
parent
dc999c55d0
commit
e89a24b8cb
6 changed files with 50 additions and 4 deletions
20
lib/actions-util.test.js
generated
20
lib/actions-util.test.js
generated
|
|
@ -314,4 +314,24 @@ on:
|
|||
`));
|
||||
t.deepEqual(errors, []);
|
||||
});
|
||||
ava_1.default("validateWorkflow() should only report the first CheckoutWrongHead", (t) => {
|
||||
const errors = actionsutil.validateWorkflow(yaml.safeLoad(`
|
||||
name: "CodeQL"
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [master]
|
||||
jobs:
|
||||
test:
|
||||
steps:
|
||||
- run: "git checkout HEAD^2"
|
||||
- run: "git checkout HEAD^2"
|
||||
- run: "git checkout HEAD^2"
|
||||
- run: "git checkout HEAD^2"
|
||||
- run: "git checkout HEAD^2"
|
||||
`));
|
||||
t.deepEqual(errors, [actionsutil.WorkflowErrors.CheckoutWrongHead]);
|
||||
});
|
||||
//# sourceMappingURL=actions-util.test.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue