2020-09-30 13:23:34 +00:00
|
|
|
name: pre-commit
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
pre-commit:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-11-05 11:06:59 +00:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/pre-commit
|
|
|
|
~/.cache/pip
|
|
|
|
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
|
2020-09-30 13:23:34 +00:00
|
|
|
- uses: actions/setup-python@v2
|
2021-11-16 14:01:17 +00:00
|
|
|
with:
|
2022-02-13 05:57:44 +00:00
|
|
|
python-version: "3.10"
|
2021-04-26 05:46:50 +00:00
|
|
|
- uses: psf/black@21.4b0
|
2020-09-30 13:23:34 +00:00
|
|
|
- name: Install pre-commit
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
python -m pip install --upgrade pre-commit
|
|
|
|
- run: pre-commit run --verbose --all-files --show-diff-on-failure
|