Try to cache pip install and dataset with actionv2 in github actions
@@ -21,6 +21,13 @@ jobs:
- name: Which python
run: |
which python
+ - uses: actions/cache@v2
+ id: cache-venv
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-venv-
- name: Install dependencies
run: |
sudo apt install git git-annex
@@ -28,14 +35,23 @@ jobs:
python -m pip install --upgrade pip
pip install setuptools wheel twine
##
- # Force install neo and tridesclous from github
+ # Force install neo from github
pip install git+https://github.com/NeuralEnsemble/python-neo.git
- pip install git+https://github.com/samuelgarcia/tridesclous.git
- # TODO remove it after neo and tridesclous release
+ # TODO remove it after neo release
##
pip install -r requirements.txt
pip install -r requirements_test.txt
pip install -e .
+ - uses: actions/cache@v2
+ id: cache-datasets
+ env:
+ # the key depend on the repo https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git
+ HASH_EPHY_DATASET: git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1
+ with:
+ path: ~/spikeinterface_datasets
+ key: ${{ runner.os }}-datasets-${{ HASH_EPHY_DATASET }}
+ restore-keys: |
+ ${{ runner.os }}-datasets
- name: Test with pytest
run: |
pytest
