Skip to content
Snippets Groups Projects
Unverified Commit 80d9af90 authored by Michael Kriese's avatar Michael Kriese Committed by GitHub
Browse files

chore(ci): clear download cache on miss (#5451)

parent 8598a15a
No related branches found
No related tags found
No related merge requests found
...@@ -65,16 +65,15 @@ jobs: ...@@ -65,16 +65,15 @@ jobs:
pip --version pip --version
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Cache Yarn packages - name: Cache Yarn packages
id: yarn_cache_packages
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ steps.init.outputs.yarn_cache }} path: ${{ steps.init.outputs.yarn_cache }}
key: ${{ runner.os }}-yarn_cache-${{ hashFiles('**/yarn.lock') }} key: v1-${{ runner.os }}-yarn_cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-yarn_cache- v1-${{ runner.os }}-yarn_cache-
- name: Cache node_modules - name: Cache node_modules
uses: actions/cache@v1 uses: actions/cache@v1
...@@ -85,6 +84,7 @@ jobs: ...@@ -85,6 +84,7 @@ jobs:
${{ runner.os }}-${{ matrix.node-version }}-yarn- ${{ runner.os }}-${{ matrix.node-version }}-yarn-
- name: Cache pip packages - name: Cache pip packages
id: pip_cache_packages
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ steps.init.outputs.pip_cache }} path: ${{ steps.init.outputs.pip_cache }}
...@@ -92,6 +92,15 @@ jobs: ...@@ -92,6 +92,15 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip- ${{ runner.os }}-${{ matrix.python-version }}-pip-
# Clear caches on cache miss, otherwise they will grow indefinitely
- name: Clear yarn cache
if: steps.yarn_cache_packages.outputs.cache-hit != 'true'
run: yarn cache clean
- name: Clear pip cache
if: steps.pip_cache_packages.outputs.cache-hit != 'true'
run: rm -rf ${{ steps.init.outputs.pip_cache }}
- name: Installing dependencies - name: Installing dependencies
shell: bash shell: bash
run: | run: |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment