Skip to content

Tests

Tests #74

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@692973e3d937129bcbf40652eb9f2f61becf3332 # 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"