Tests #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |