From 1bbc7809ac2f404a08c85a4173045a2a516d5812 Mon Sep 17 00:00:00 2001 From: Garrett Michael Flynn Date: Fri, 24 May 2024 08:50:54 -0700 Subject: [PATCH] Update testing-pipelines.yml --- .github/workflows/testing-pipelines.yml | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/.github/workflows/testing-pipelines.yml b/.github/workflows/testing-pipelines.yml index 18b365548..be70fd876 100644 --- a/.github/workflows/testing-pipelines.yml +++ b/.github/workflows/testing-pipelines.yml @@ -74,6 +74,55 @@ jobs: - name: Install GUIDE run: npm ci --verbose + # Download GIN Testing Data (modified from https://github.com/catalystneuro/neuroconv/blob/main/.github/workflows/testing.yml) + - name: Get ephy_testing_data current head hash + id: ephys + run: echo "::set-output name=HASH_EPHY_DATASET::$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)" + - name: Cache ephys dataset - ${{ steps.ephys.outputs.HASH_EPHY_DATASET }} + uses: actions/cache@v4 + id: cache-ephys-datasets + with: + path: ./ephy_testing_data + key: ephys-datasets-2024-03-27-${{ matrix.os }}-${{ steps.ephys.outputs.HASH_EPHY_DATASET }} + - name: Get ophys_testing_data current head hash + id: ophys + run: echo "::set-output name=HASH_OPHYS_DATASET::$(git ls-remote https://gin.g-node.org/CatalystNeuro/ophys_testing_data.git HEAD | cut -f1)" + - name: Cache ophys dataset - ${{ steps.ophys.outputs.HASH_OPHYS_DATASET }} + uses: actions/cache@v4 + id: cache-ophys-datasets + with: + path: ./ophys_testing_data + key: ophys-datasets-2022-08-18-${{ matrix.os }}-${{ steps.ophys.outputs.HASH_OPHYS_DATASET }} + - name: Get behavior_testing_data current head hash + id: behavior + run: echo "::set-output name=HASH_BEHAVIOR_DATASET::$(git ls-remote https://gin.g-node.org/CatalystNeuro/behavior_testing_data.git HEAD | cut -f1)" + - name: Cache behavior dataset - ${{ steps.behavior.outputs.HASH_BEHAVIOR_DATASET }} + uses: actions/cache@v4 + id: cache-behavior-datasets + with: + path: ./behavior_testing_data + key: behavior-datasets-2023-07-26-${{ matrix.os }}-${{ steps.behavior.outputs.HASH_behavior_DATASET }} + + + + - if: steps.cache-ephys-datasets.outputs.cache-hit != 'true' || steps.cache-ophys-datasets.outputs.cache-hit != 'true' || steps.cache-behavior-datasets.outputs.cache-hit != 'true' + name: Install and configure AWS CLI + run: | + pip install awscli + aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} + - if: steps.cache-ephys-datasets.outputs.cache-hit != 'true' + name: Download ephys dataset from S3 + run: aws s3 cp --recursive ${{ secrets.S3_GIN_BUCKET }}/ephy_testing_data ~/NWB_GUIDE/test-data/GIN/ephy_testing_data + - if: steps.cache-ophys-datasets.outputs.cache-hit != 'true' + name: Download ophys dataset from S3 + run: aws s3 cp --recursive ${{ secrets.S3_GIN_BUCKET }}/ophys_testing_data ~/NWB_GUIDE/test-data/GIN/ophys_testing_data + - if: steps.cache-behavior-datasets.outputs.cache-hit != 'true' + name: Download behavior dataset from S3 + run: aws s3 cp --recursive ${{ secrets.S3_GIN_BUCKET }}/behavior_testing_data ~/NWB_GUIDE/test-data/GIN/behavior_testing_data + + + - if: matrix.os != 'ubuntu-latest' name: Run tests run: npm run test:pipelines