Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: pre-commit

on:
push:
branches: [master, 'release/*']
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: pre-commit/action@v3.0.1
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Commands to run below checks locally:
# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks trailing-whitespace --all-files
# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-ast --all-files
# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-json --all-files
# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-merge-conflict --all-files
# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-toml --all-files
# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-yaml --all-files
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
Loading