Skip to content

Commit 516e968

Browse files
kurtmckeejonhealy1
andauthored
Remove actions/cache in favor of actions/setup-python caching (#288)
**Description:** Currently, all CI jobs emit warnings due to `actions/cache@v3`, which uses an old Node.js version ([recent example](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/actions/runs/10507540026)). > ![image](https://github.com/user-attachments/assets/bd0ea622-1ff4-4d16-8762-69307a79d5f8) However, on inspection, it appears that `actions/cache` is configured incorrectly: * There are no lock files for it to hash, resulting in a blank portion in the cache key ([caches generated in CI](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/actions/caches)). > ![image](https://github.com/user-attachments/assets/9b980b18-d9df-49ae-9bc4-21223216b0bb) * The comments in the YAML claim that it's caching for pipenv, but then caches the pip directory instead. > ![image](https://github.com/user-attachments/assets/3e45be98-0a69-4e25-ad80-a1ee8974d698) Therefore, this PR rips out `actions/cache` in favor of the Python caching already supported by `actions/setup-python`. If this merges, please close #284. **PR Checklist:** - [x] Code is formatted and linted (run `pre-commit run --all-files`) - [ ] Tests pass (run `make test`) _n/a_ - [ ] Documentation has been updated to reflect changes, if applicable _n/a_ - [ ] Changes are added to the changelog _n/a_ Co-authored-by: Jonathan Healy <jonathan.d.healy@gmail.com>
1 parent 1396fce commit 516e968

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

.github/workflows/cicd.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,9 @@ jobs:
7878
uses: actions/setup-python@v5
7979
with:
8080
python-version: ${{ matrix.python-version }}
81-
82-
- name: Cache pipenv packages
83-
uses: actions/cache@v3
84-
with:
85-
path: ~/.cache/pip
86-
key: ${{ runner.os }}-pip-${{ hashFiles('**/Pipfile.lock') }}
87-
restore-keys: |
88-
${{ runner.os }}-pip-
81+
cache: 'pip'
82+
cache-dependency-path: |
83+
**/setup.py
8984
9085
- name: Lint code
9186
if: ${{ matrix.python-version == 3.11 }}

0 commit comments

Comments
 (0)