Skip to content

Commit b830e8c

Browse files
author
Safoora Yousefi
committed
caching
1 parent 8d71471 commit b830e8c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/eureka-tests.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ jobs:
1919
- name: Cache hf_home
2020
uses: actions/cache@v3
2121
with:
22-
path: hf_home
23-
key: hf_home
22+
path: ${{ github.workspace }}/hf_home
23+
key: ${{ runner.os }}-hf_home-${{ hashFiles('**/requirements.txt', '**/setup.py') }}
24+
- name: Cache venv
25+
uses: actions/cache@v3
26+
with:
27+
path: ${{ github.workspace }}/.venv
28+
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements.txt', '**/setup.py') }}
2429
- uses: actions/checkout@v4
2530
- name: Set up Python 3.10
2631
uses: actions/setup-python@v3
@@ -30,6 +35,9 @@ jobs:
3035

3136
- name: Install dependencies
3237
run: |
38+
python -m venv ${{ github.workspace }}/.venv
39+
source ${{ github.workspace }}/.venv/bin/activate
40+
pip install --upgrade pip
3341
pip install -r requirements.txt
3442
pip install .
3543
- name: Run linters
@@ -38,6 +46,7 @@ jobs:
3846
make linters
3947
- name: Run tests
4048
run: |
49+
source ${{ github.workspace }}/.venv/bin/activate
4150
export HF_HOME="${{ github.workspace }} /hf_home"
4251
echo "$HF_HOME"
4352
mkdir -p "$HF_HOME"

0 commit comments

Comments
 (0)