File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -76,19 +76,33 @@ jobs:
76
76
conda info -a
77
77
conda list
78
78
python xarray/util/print_versions.py
79
+
80
+ # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
79
81
- name : Restore cached hypothesis directory
80
- uses : actions/cache@v4
82
+ id : restore-hypothesis-cache
83
+ uses : actions/cache/restore@v4
81
84
with :
82
85
path : .hypothesis/
83
- key : cache-hypothesis
84
- enableCrossOsArchive : true
85
- save-always : true
86
+ key : cache-hypothesis-${{ runner.os }}-${{ github.run_id }}
87
+ restore-keys : |
88
+ cache-hypothesis-
89
+
86
90
- name : Run slow Hypothesis tests
87
91
if : success()
88
92
id : status
89
93
run : |
90
94
python -m pytest --hypothesis-show-statistics --run-slow-hypothesis properties/*.py \
91
95
--report-log output-${{ matrix.python-version }}-log.jsonl
96
+
97
+ # explicitly save the cache so it gets updated, also do this even if it fails.
98
+ - name : Save cached hypothesis directory
99
+ id : save-hypothesis-cache
100
+ if : always() && steps.status.outcome != 'skipped'
101
+ uses : actions/cache/save@v4
102
+ with :
103
+ path : .hypothesis/
104
+ key : cache-hypothesis-${{ runner.os }}-${{ github.run_id }}
105
+
92
106
- name : Generate and publish the report
93
107
if : |
94
108
failure()
You can’t perform that action at this time.
0 commit comments