@@ -13,20 +13,21 @@ concurrency: # Cancel previous workflows on the same pull request
1313
1414jobs :
1515 build-and-test :
16- name : Test on (${{ inputs.os }}) (${{ matrix.python-version}})
16+ name : Test on (${{ inputs.os }}) (${{ matrix.python-version}}) (${{ matrix.numpy-version }})
1717 runs-on : ${{ inputs.os }}
1818 strategy :
1919 fail-fast : true
2020 matrix :
21- python-version : ['3.9', '3.11']
21+ python-version : ['3.9', '3.12']
22+ numpy-version : ['1.26', '2.0']
2223 defaults :
2324 # by default run in bash mode (required for conda usage)
2425 run :
2526 shell : bash -l {0}
2627 steps :
2728
2829 - name : Checkout repository
29- uses : actions/checkout@v3
30+ uses : actions/checkout@v4
3031
3132 - name : Get current year-month
3233 id : date
3839 run : |
3940 echo "dataset_hash=$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)" >> $GITHUB_OUTPUT
4041
41- - uses : actions/cache/restore@v3
42+ - uses : actions/cache/restore@v4
4243 # Loading cache of ephys_testing_dataset
4344 id : cache-datasets
4445 with :
@@ -48,34 +49,45 @@ jobs:
4849
4950 - uses : conda-incubator/setup-miniconda@v3
5051 with :
51- activate-environment : neo-test-env
52+ activate-environment : neo-test-env-${{ matrix.python-version }}
5253 python-version : " ${{ matrix.python-version }}"
53-
54- - name : Get current dependencies hash
55- id : dependencies
56- run : |
57- echo "hash=${{hashFiles('**/pyproject.toml', '**/environment_testing.yml')}}" >> $GITHUB_OUTPUT
58-
59- - uses : actions/cache/restore@v3
54+
55+ # TEST NOT USING CACHE
56+ # - name: Get current dependencies hash
57+ # id: dependencies
58+ # run: |
59+ # echo "hash=${{hashFiles('**/pyproject.toml', '**/environment_testing.yml')}}" >> $GITHUB_OUTPUT
60+
61+ # - uses: actions/cache/restore@v3
6062 # the cache for python package is reset:
6163 # * every month
6264 # * when package dependencies change
63- id : cache-conda-env
64- with :
65- path : /usr/share/miniconda/envs/neo-test-env
66- key : ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-${{ steps.date.outputs.date }}
65+ # id: cache-conda-env
66+ # with:
67+ # path: /usr/share/miniconda/envs/neo-test-env-${{ matrix.python-version }}
68+ # key: ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-${{ steps.date.outputs.date }}
6769 # restore-keys match any key that starts with the restore-key
68- restore-keys : |
69- ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-
70- ${{ runner.os }}-conda-env-
70+ # restore-keys: |
71+ # ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-
72+ # ${{ runner.os }}-conda-env-
7173
7274 - name : Install testing dependencies
7375 # testing environment is only created from yml if no cache was found
7476 # restore-key hits should result in `cache-hit` == 'false'
75- if : steps.cache-conda-env.outputs.cache-hit != 'true'
77+ # if: steps.cache-conda-env.outputs.cache-hit != 'true'
7678 run : |
77- conda env update --name neo-test-env --file environment_testing.yml --prune
78- conda install python=${{ matrix.python-version }}
79+ conda install pip numpy=${{ matrix.numpy-version }} -c conda-forge
80+ # this command is for updating cache. We are resting removal.
81+ # conda env update --name neo-test-env-${{ matrix.python-version }} --file environment_testing.yml --prune
82+
83+ - name : Install git-annex
84+ # this is the trick from the spikeinterface repo for getting git-annex to work with datalad
85+ # see https://github.com/SpikeInterface/spikeinterface/pull/3877 for more info
86+ shell : bash
87+ run : |
88+ pip install datalad-installer
89+ datalad-installer --sudo ok git-annex --method datalad/packages
90+ git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency
7991
8092 - name : Configure git
8193 run : |
@@ -90,23 +102,17 @@ jobs:
90102 - name : Install neo including dependencies
91103 # installation with dependencies is only required if no cache was found
92104 # restore-key hits should result in `cache-hit` == 'false'
93- if : steps.cache-conda-env.outputs.cache-hit != 'true'
105+ # if: steps.cache-conda-env.outputs.cache-hit != 'true'
94106 run : |
95107 pip install --upgrade -e .
96108 pip install .[test]
97109
98- - name : Install neo without dependencies
110+ # TEST NOT USING CACHE
111+ # - name: Install neo without dependencies
99112 # only installing neo version to test as dependencies should be in cached conda env already
100- if : steps.cache-conda-env.outputs.cache-hit == 'true'
101- run : |
102- pip install --no-dependencies -e .
103-
104- - name : Install wine
105- run : |
106- sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
107- sudo dpkg --add-architecture i386
108- sudo apt-get update -qq
109- sudo apt-get install -yqq --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386 wine
113+ # if: steps.cache-conda-env.outputs.cache-hit == 'true'
114+ # run: |
115+ # pip install --no-dependencies -e .
110116
111117 - name : Pip list
112118 run : |
0 commit comments