Skip to content

Commit

Permalink
Cache precommit on Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Uxio0 committed Nov 9, 2022
1 parent 56ef616 commit 4bdfb68
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '.pre-commit-config.yaml'
- name: set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install dependencies
run: pip install pre-commit
run: pip install -U pre-commit
- name: Run pre-commit
run: pre-commit run --all-files

Expand Down

0 comments on commit 4bdfb68

Please sign in to comment.