Skip to content

tests: extend tests with failing check #18

tests: extend tests with failing check

tests: extend tests with failing check #18

Workflow file for this run

name: "Tests"
on:
push:
branches:
- main
- dev
- develop
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: "15 7 */7 * *"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: boidolr/actions/setup-precommit@main
with:
working-directory: tests
- name: Check hook pass
run: pre-commit run --config "tests/.pre-commit-config.yaml" --all-files ast-grep-pass
- name: Check hook failure
shell: bash
run: |
set +e
pre-commit run --config "tests/.pre-commit-config.yaml" --all-files ast-grep-fail
if [[ "$?" == "0" ]]; then exit 1; fi
echo "::notice::Hook failed as expected"