Skip to content

Commit

Permalink
change cache workflow to save
Browse files Browse the repository at this point in the history
  • Loading branch information
YigitElma committed Aug 23, 2024
1 parent 52cb5af commit 008036d
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/pythonpip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,20 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Cache Python environment
id: cache-env
uses: actions/cache@v3
with:
path: ./.venv-${{ matrix.python-version }}
key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('devtools/dev-requirements.txt') }}--${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('devtools/dev-requirements.txt') }}--${{ hashFiles('requirements.txt') }}
- name: Set up virtual environment
run: |
python -m venv .venv-${{ matrix.python-version }}
source .venv-${{ matrix.python-version }}/bin/activate
python -m pip install --upgrade pip
pip install -r devtools/dev-requirements.txt
- name: Cache Python environment
id: cache-env
uses: actions/cache/save@v3
with:
path: ./.venv-${{ matrix.python-version }}
key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('devtools/dev-requirements.txt') }}--${{ hashFiles('requirements.txt') }}

- name: Verify virtual environment activation
run: |
source .venv-${{ matrix.python-version }}/bin/activate
Expand Down

0 comments on commit 008036d

Please sign in to comment.