Skip to content

Commit

Permalink
add caching for windows runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz-Alexander-Kern committed Apr 26, 2024
1 parent 168002d commit 7ae479a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,19 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/requirements-tests.txt') }}
-${{ hashFiles('**/requirements-extras.txt') }}-${{ hashFiles('setup.py') }} -${{ hashFiles('**/CI.yml') }}-${{ steps.date.outputs.date }}

- name: Get current hash (SHA) of the elephant_data repo
id: elephant-data
run: |
echo "dataset_hash=$(git ls-remote https://gin.g-node.org/NeuralEnsemble/elephant-data.git HEAD | cut -f1)" >> $GITHUB_OUTPUT
- uses: actions/cache/restore@v3
# Loading cache of elephant-data
id: cache-datasets
with:
path: ~/elephant-data
key: ${{ runner.os }}-datasets-${{ steps.elephant-data.outputs.dataset_hash }}
restore-keys: ${{ runner.os }}-datasets-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -243,6 +256,10 @@ jobs:
- name: Test with pytest
run: |
if (Test-Path "$env:~\elephant-data") {
$env:ELEPHANT_DATA_PATH = "$env:~\elephant-data"
Write-Output $env:ELEPHANT_DATA_PATH
}
pytest --cov=elephant
# __ __ ____ ___
Expand Down

0 comments on commit 7ae479a

Please sign in to comment.