1
1
Fork 0
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:
Albert Tugushev 2019-11-26 04:02:53 +07:00 committed by Xavier Fernandez
parent 8114003e62
commit 83a9a12f96
2 changed files with 6 additions and 0 deletions

View file

@ -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

View file