2020-09-30 18:53:34 +05:30
|
|
|
name: pre-commit
|
|
|
|
|
2022-07-11 13:11:17 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
2020-09-30 18:53:34 +05:30
|
|
|
|
|
|
|
jobs:
|
|
|
|
pre-commit:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-07 05:25:25 +02:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/cache@v3
|
2020-11-05 16:36:59 +05:30
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/pre-commit
|
|
|
|
~/.cache/pip
|
|
|
|
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
|
2022-07-07 05:25:25 +02:00
|
|
|
- uses: actions/setup-python@v4
|
2021-11-16 06:01:17 -08:00
|
|
|
with:
|
2022-07-07 05:25:25 +02:00
|
|
|
python-version: 3.x
|
|
|
|
# - uses: psf/black@22.6.0
|
2020-09-30 18:53:34 +05:30
|
|
|
- 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
|