add pre-commit hooks (#6) #1
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: Linter | |
on: | |
pull_request: | |
branches: ['master', 'main'] | |
paths-ignore: ['docs/**'] | |
push: | |
branches: ['master', 'main'] | |
paths-ignore: ['docs/**'] | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
linter: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code Repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
# Consider using pre-commit.ci for open source project | |
- name: Run pre-commit | |
uses: abe-101/[email protected] | |
with: | |
extra_args: --hook-stage push |