Merge pull request #21 from remerge/update-template #80
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 | |
on: | |
pull_request: | |
push: | |
branches: [main, master] | |
permissions: read-all | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install poetry | |
uses: snok/install-poetry@v1 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "poetry" | |
- name: Load envrc | |
uses: HatsuneMiku3939/direnv-action@v1 | |
- name: Setup pre-commit | |
run: python -m pip install pre-commit | |
- name: Install project dependencies | |
run: make install | |
- name: Run pre-commit checks | |
uses: pre-commit/[email protected] |