Skip to content

Commit f009b19

Browse files
author
Peyton Gardipee
committed
Add cache display before and after running tests in GitHub workflow
1 parent b1084fd commit f009b19

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/cpu-tests.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CPU tests
33
on:
44
push:
55
branches: [main]
6-
pull_request_target:
6+
pull_request:
77
branches: [main]
88
types: [opened, reopened, ready_for_review, labeled, synchronize]
99
pull_request: {} # todo
@@ -122,15 +122,32 @@ jobs:
122122
pip install '.[extra,compiler,test]' -U --upgrade-strategy eager
123123
pip list
124124
125+
- name: Show cache before tests
126+
run: |
127+
pip install -q py-tree
128+
echo "=== Cache contents BEFORE running tests ==="
129+
if [ -d ".cache-HF" ]; then
130+
python -m py_tree -d 1 .cache-HF
131+
else
132+
echo "No .cache-HF directory found"
133+
fi
134+
echo "=== End cache contents BEFORE tests ==="
135+
125136
- name: Run tests
126137
env:
127138
HF_TOKEN: ${{ secrets.HF_TOKEN }}
128139
run: pytest -v litgpt/ tests/ --timeout=180 --durations=100 --ignore=tests/test_tokenizer.py
129140

130-
- name: Show cache
141+
- name: Show cache after tests
131142
run: |
132143
pip install -q py-tree
133-
python -m py_tree -d 1 .cache-HF
144+
echo "=== Cache contents AFTER running tests ==="
145+
if [ -d ".cache-HF" ]; then
146+
python -m py_tree -d 1 .cache-HF
147+
else
148+
echo "No .cache-HF directory found"
149+
fi
150+
echo "=== End cache contents AFTER tests ==="
134151
135152
testing-guardian:
136153
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)