fix(action): allow forward sync from trailer commits
This commit is contained in:
17
tests/unit/action.bats
Normal file
17
tests/unit/action.bats
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bats
|
||||
# tests/unit/action.bats — Composite action regression tests
|
||||
|
||||
setup() {
|
||||
JOSH_SYNC_ROOT="$(cd "$BATS_TEST_DIRNAME/../.." && pwd)"
|
||||
ACTION_FILE="${JOSH_SYNC_ROOT}/action.yml"
|
||||
}
|
||||
|
||||
@test "forward sync is not globally skipped when HEAD has the sync trailer" {
|
||||
! grep -q "Loop guard (forward)" "$ACTION_FILE"
|
||||
! grep -q "HEAD commit has sync trailer" "$ACTION_FILE"
|
||||
! grep -q "steps.guard.outputs.skip" "$ACTION_FILE"
|
||||
}
|
||||
|
||||
@test "composite action still invokes the josh-sync CLI" {
|
||||
grep -q "josh-sync sync" "$ACTION_FILE"
|
||||
}
|
||||
Reference in New Issue
Block a user