Skip to content

Commit 8c774c0

Browse files
[ci] cache downloads
1 parent 9195165 commit 8c774c0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/testing.yml

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Build
22
on: [push, pull_request]
3+
env:
4+
CACHE_NUMBER: 0 # increase to reset cache manually
35
jobs:
46
run-tests:
57
name: Run tests
@@ -17,6 +19,14 @@ jobs:
1719
with:
1820
auto-update-conda: true
1921
python-version: ${{ matrix.python-version }}
22+
- name: Set cache date
23+
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
24+
- name: Conda download cache
25+
id: myconda-download-cache
26+
uses: actions/cache@v3
27+
with:
28+
path: /usr/share/miniconda/pkgs/
29+
key: ${{ matrix.python-version }}-conda-${{ hashFiles('requirements*.txt') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
2030
- name: Install imagemagick
2131
run: |
2232
sudo apt-get install -y imagemagick libstdc++6

0 commit comments

Comments
 (0)