Add GitHub Actions #2
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: pre-commit checks | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
precommit: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, 3.10] | |
steps: | |
- uses: actions/checkout@v4.1.3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5.2.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Running precommit checks | |
run: | | |
pip install pre-commit | |
pre-commit install-hooks | |
pre-commit run --all-files --show-diff-on-failure |