Skip to content

Update template

Update template #94

Workflow file for this run

---
name: pre-commit
on:
pull_request:
push:
branches: [main, master]
permissions:
actions: none
checks: none
contents: read
deployments: none
discussions: none
id-token: none
issues: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
# https://github.com/actions/checkout/releases
uses: actions/checkout@v4
- name: Install poetry
# https://github.com/snok/install-poetry/releases
uses: snok/install-poetry@v1
- name: Setup Python
# https://github.com/actions/setup-python/releases
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "poetry"
- name: Load envrc
# https://github.com/HatsuneMiku3939/direnv-action/releases
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
# https://github.com/pre-commit/action/releases
uses: pre-commit/[email protected]