mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Cache pre-commit in GitHib Actions (#7400)
See https://pre-commit.com/#github-actions-example
This commit is contained in:
parent
8114003e62
commit
83a9a12f96
2 changed files with 6 additions and 0 deletions
6
.github/workflows/python-linters.yml
vendored
6
.github/workflows/python-linters.yml
vendored
|
@ -26,6 +26,12 @@ jobs:
|
|||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.env.PYTHON_VERSION || 3.7 }}
|
||||
- name: set PY
|
||||
run: echo "::set-env name=PY::$(python -VV | sha256sum | cut -d' ' -f1)"
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
- name: Pre-configure global Git settings
|
||||
run: >-
|
||||
tools/travis/setup.sh
|
||||
|
|
0
news/pre-commit-gha-cache.trivial
Normal file
0
news/pre-commit-gha-cache.trivial
Normal file
Loading…
Reference in a new issue