Skip to content

Commit

Permalink
chore: cache pip installation
Browse files Browse the repository at this point in the history
  • Loading branch information
eddies committed Feb 17, 2020
1 parent 92092bb commit 8db2980
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache
id: pip-cache
run: |
python -c "import site; print('::set-output name=dir:: + site.getsitepackages()[0])"
- uses: actions/cache@v1
id: cache
with:
path: ~/.cache/pip
path: ${{ steps.pip-cache.outputs.dir }}/../../../
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
Expand Down

0 comments on commit 8db2980

Please sign in to comment.