Skip to content

update-testing-data #16

update-testing-data

update-testing-data #16

name: update-testing-data
on:
schedule:
- cron: "0 0 * * *" # daily
workflow_dispatch:
jobs:
run:
name: Update testing data on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: s-weigand/setup-conda@v1
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow --tags
- name: Setup Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Global Setup
run: |
pip install -U pip
git config --global user.email "CI@example.com"
git config --global user.name "CI Almighty"
pip install wheel==0.41.2 # needed for scanimage
- 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@v2
id: cache-ophys-datasets
with:
path: ./ophys_testing_data
key: ophys-datasets-042023-${{ matrix.os }}-${{ steps.ophys.outputs.HASH_OPHYS_DATASET }}
- if: steps.cache-ophys-datasets.outputs.cache-hit == false
name: Install and configure AWS CLI
run: |
pip install awscli==1.29.56
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-ophys-datasets.outputs.cache-hit == false
name: Download data from S3
run: aws s3 cp --recursive s3://${{ secrets.S3_GIN_BUCKET }}//ophys_testing_data ./ophys_testing_data