diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 01ea88854..8df57708a 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -39,11 +39,17 @@ jobs: - name: 'Check gcloud CLI' run: 'gcloud info' + - name: Generate cache key + id: cache-key + run: echo "key=gcs_cache_integration_tests_$(date +%Y%m)" >> "$GITHUB_OUTPUT" + - name: Restore GCS cache uses: actions/cache/restore@v3 with: path: gcs_cache - key: gcs_cache_integration_tests_20240922 + key: ${{ steps.cache-key.outputs.key }} + restore-keys: | + gcs_cache_integration_tests_ - name: Run integration tests run: poetry run pytest --durations=20 -v tests/integration @@ -53,4 +59,4 @@ jobs: if: always() with: path: gcs_cache - key: gcs_cache_integration_tests_20240922 + key: ${{ steps.cache-key.outputs.key }} diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index ee919d0b2..19a6247dd 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -35,11 +35,17 @@ jobs: - name: 'Check gcloud CLI' run: 'gcloud info' + - name: Generate cache key + id: cache-key + run: echo "key=gcs_cache_notebooks_$(date +%Y%m)" >> "$GITHUB_OUTPUT" + - name: Restore GCS cache uses: actions/cache/restore@v3 with: path: gcs_cache - key: gcs_cache_notebooks_20240922 + key: ${{ steps.cache-key.outputs.key }} + restore-keys: | + gcs_cache_notebooks_ - name: Run notebooks run: poetry run jupyter nbconvert --execute notebooks/*.ipynb --inplace @@ -49,4 +55,4 @@ jobs: if: always() with: path: gcs_cache - key: gcs_cache_notebooks_20240922 + key: ${{ steps.cache-key.outputs.key }}