Skip to content

Commit

Permalink
Replace actions/cache with actions/setup-python's pip caching
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Nov 18, 2021
1 parent 5d3a714 commit 83eadc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,12 @@ jobs:
with:
fetch-depth: 0

- name: Cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: deploy-${{ hashFiles('**/setup.py') }}
restore-keys: |
deploy-
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
cache: pip
cache-dependency-path: "setup.py"

- name: Install dependencies
run: |
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,8 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ matrix.os }}-${{ matrix.python-version }}-v2-${{
hashFiles('**/setup.py') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-v2-
cache: pip
cache-dependency-path: "setup.py"

- name: Install dependencies
run: |
Expand Down

0 comments on commit 83eadc0

Please sign in to comment.