File tree Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Original file line number Diff line number Diff line change 35
35
uses : actions/setup-python@v4
36
36
with :
37
37
python-version : ${{ matrix.python-version }}
38
+
39
+ - name : Restore test cache artifacts
40
+ id : cache-artifacts-restore
41
+ uses : actions/cache/restore@v4
42
+ with :
43
+ path : |
44
+ ~/.cache/garak/data
45
+ ~/.cache/huggingface
46
+ key : ${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
47
+
38
48
- name : Install dependencies
39
49
run : |
40
50
python -m pip install --upgrade pip
43
53
- name : Test with pytest
44
54
run : |
45
55
python -m pytest tests/
56
+
57
+ - name : Save test cache
58
+ if : steps.cache-artifacts-restore.outputs.cache-hit != 'true'
59
+ uses : actions/cache@v4
60
+ with :
61
+ path : |
62
+ ~/.cache/garak/data
63
+ ~/.cache/huggingface
64
+ !~/.cache/huggingface/hub/*facebook*
65
+ !~/.cache/huggingface/hub/*Helsinki*
66
+ key : ${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
Original file line number Diff line number Diff line change 39
39
with :
40
40
python-version : ${{ matrix.python-version }}
41
41
42
+ - name : Restore test cache artifacts
43
+ id : cache-artifacts-restore
44
+ uses : actions/cache/restore@v4
45
+ with :
46
+ path : |
47
+ ~/.cache/garak/data
48
+ ~/.cache/huggingface
49
+ key : ${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
50
+
42
51
- name : Install dependencies
43
52
run : |
44
53
brew install libmagic
51
60
run : |
52
61
cd garak
53
62
python -m pytest tests/
63
+
64
+ - name : Save test cache
65
+ if : steps.cache-artifacts-restore.outputs.cache-hit != 'true'
66
+ uses : actions/cache@v4
67
+ with :
68
+ path : |
69
+ ~/.cache/garak/data
70
+ ~/.cache/huggingface
71
+ !~/.cache/huggingface/hub/*facebook*
72
+ !~/.cache/huggingface/hub/*Helsinki*
73
+ key : ${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
Original file line number Diff line number Diff line change 39
39
with :
40
40
python-version : ${{ matrix.python-version }}
41
41
42
+ - name : Restore test cache artifacts
43
+ id : cache-artifacts-restore
44
+ uses : actions/cache/restore@v4
45
+ with :
46
+ path : |
47
+ ~/.cache/garak/data
48
+ ~/.cache/huggingface
49
+ key : ${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
50
+
42
51
- name : Install dependencies
43
52
run : |
44
53
python -m pip install --upgrade pip
50
59
run : |
51
60
cd garak
52
61
python -m pytest tests/
62
+
63
+ - name : Save test cache
64
+ if : steps.cache-artifacts-restore.outputs.cache-hit != 'true'
65
+ uses : actions/cache@v4
66
+ with :
67
+ path : |
68
+ ~/.cache/garak/data
69
+ ~/.cache/huggingface
70
+ !~/.cache/huggingface/hub/*facebook*
71
+ !~/.cache/huggingface/hub/*Helsinki*
72
+ key : ${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
You can’t perform that action at this time.
0 commit comments