Skip to content

Commit

Permalink
Fix cache location across OSes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Apr 8, 2020
1 parent f0b105e commit bc2f4a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ jobs:
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
# https://github.com/actions/cache/blob/master/examples.md#using-a-script-to-get-cache-location
- id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- uses: actions/cache@v1
with:
path: ~/.cache/pip
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
Expand Down

0 comments on commit bc2f4a1

Please sign in to comment.