cache pip with setup-python action
This commit is contained in:
parent
426a1e25b7
commit
925674761e
1 changed files with 2 additions and 8 deletions
10
.github/workflows/tests.yaml
vendored
10
.github/workflows/tests.yaml
vendored
|
|
@ -41,18 +41,12 @@ jobs:
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python }}
|
||||||
|
cache: 'pip'
|
||||||
|
cache-dependency-path: 'requirements/*.txt'
|
||||||
- name: update pip
|
- name: update pip
|
||||||
run: |
|
run: |
|
||||||
pip install -U wheel
|
pip install -U wheel
|
||||||
pip install -U setuptools
|
pip install -U setuptools
|
||||||
python -m pip install -U pip
|
python -m pip install -U pip
|
||||||
- name: get pip cache dir
|
|
||||||
id: pip-cache
|
|
||||||
run: echo "::set-output name=dir::$(pip cache dir)"
|
|
||||||
- name: cache pip
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pip-cache.outputs.dir }}
|
|
||||||
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/*.txt') }}
|
|
||||||
- run: pip install tox
|
- run: pip install tox
|
||||||
- run: tox -e ${{ matrix.tox }}
|
- run: tox -e ${{ matrix.tox }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue