wip cache CI
@@ -24,7 +24,7 @@ jobs:
- uses: actions/cache@v2
id: cache-venv
with:
- path: ./test_env
+ path: ~/test_env
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/requirements_test.txt') }}
restore-keys: |
${{ runner.os }}-venv
@@ -38,8 +38,8 @@ jobs:
# this is for spyking circus
sudo apt install mpich libmpich-dev
# create an environement (better for cahing)
- python -m venv test_env
- source ./test_env/bin/activate
+ python -m venv ~/test_env
+ source ~/test_env/bin/activate
python -m pip install --upgrade pip
pip install setuptools wheel twine
##
@@ -50,6 +50,11 @@ jobs:
pip install -r requirements.txt
pip install -r requirements_test.txt
pip install -e .
+ - name: Get ephy_testing_data current head hash
+ # the key depend on the last comit repo https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git
+ id: vars
+ run: |
+ echo "::set-output name=HASH_EPHY_DATASET::$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)"
- uses: actions/cache@v2
id: cache-datasets
env:
@@ -57,12 +62,12 @@ jobs:
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-${{ env.HASH_EPHY_DATASET }}
+ key: ${{ runner.os }}-datasets-${{ steps.vars.outputs.HASH_EPHY_DATASET }}
restore-keys: |
${{ runner.os }}-datasets
- name: Test with pytest
run: |
- source ./test_env/bin/activate
+ source ~/test_env/bin/activate
pytest
