[CI] Use pre-commit to run linter (#321)

Co-authored-by: kevin314 <kevin.lin.cs1@gmail.com>
This commit is contained in:
William Lin
2025-04-08 11:38:47 -07:00
committed by GitHub
co-authored by kevin314
parent 60eeea50bb
commit 15553f7706
39 changed files with 525 additions and 756 deletions
+18
View File
@@ -0,0 +1,18 @@
name: pre-commit
on:
workflow_call:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- run: echo "::add-matcher::.github/workflows/matchers/actionlint.json"
- run: echo "::add-matcher::.github/workflows/matchers/mypy.json"
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files --hook-stage manual