Skip to content

Commit

Permalink
add venv cache
Browse files Browse the repository at this point in the history
  • Loading branch information
chiang-yuan committed Nov 12, 2024
1 parent c1d2139 commit 889a845
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,17 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Restore cached virtualenv
uses: actions/cache/restore@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
path: .venv


- name: Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install torch==2.2.0
bash scripts/install-pyg.sh
Expand All @@ -33,6 +42,12 @@ jobs:
- name: List dependencies
run: pip list

- name: Saved cached virtualenv
uses: actions/cache/save@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
path: .venv

- name: Login huggingface
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
Expand Down

0 comments on commit 889a845

Please sign in to comment.