Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
Fixed incorrect caching-key in testing workflow
  • Loading branch information
plonerma authored Nov 12, 2024
1 parent 1939e8d commit 7cee1e2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,16 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

# Write the exact Python version to a file for cache-busting.
- run: |
echo "${{ steps.setup-python.outputs.python-version }}" > ".installed-python"
- uses: "actions/cache@v4"
id: "restore-cache"
with:
key: "venv-${{ hashFiles('.installed-python', 'requirements.txt') }}"
path: |
.venv/
key: "venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}"
path: .venv/

- name: "Create a virtual environment"
if: "steps.restore-cache.outputs.cache-hit == false"
Expand Down

0 comments on commit 7cee1e2

Please sign in to comment.