Skip to content

Commit

Permalink
Merge pull request #251 from catalystneuro/workflow
Browse files Browse the repository at this point in the history
Fixed Github Workflows
  • Loading branch information
CodyCBakerPhD authored Sep 28, 2023
2 parents 2dbf0f8 + 94ddfa0 commit 1978ddd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Full Tests
on:
schedule:
- cron: "0 0 * * *" # daily
pull_request:
workflow_dispatch:
workflow_run:
workflows: [update-testing-data]
types: [completed]

jobs:
run:
Expand All @@ -29,18 +30,17 @@ jobs:
pip install pytest-xdist
git config --global user.email "[email protected]"
git config --global user.name "CI Almighty"
pip install wheel # needed for scanimage
pip install wheel==0.41.2 # needed for scanimage
- name: Install roiextractors with minimal requirements
run: pip install .[test]

- name: Run minimal tests
run: pytest tests/test_internals -n auto --dist loadscope

- name: Test full installation (-e needed for codecov report)
run: pip install -e .[full]



- 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)"
Expand All @@ -50,17 +50,6 @@ jobs:
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.25.27
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



- name: Run full pytest with coverage
run: pytest -n auto --dist loadscope --cov=./ --cov-report xml:./codecov.xml
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/update-testing-data.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Update testing data
name: update-testing-data
on:
schedule:
- cron: "0 0 * * *" # daily
workflow_dispatch:

jobs:
Expand All @@ -24,7 +26,7 @@ jobs:
pip install -U pip
git config --global user.email "[email protected]"
git config --global user.name "CI Almighty"
pip install wheel # needed for scanimage
pip install wheel==0.41.2 # needed for scanimage
- name: Get ophys_testing_data current head hash
id: ophys
Expand All @@ -38,7 +40,7 @@ jobs:
- if: steps.cache-ophys-datasets.outputs.cache-hit == false
name: Install and configure AWS CLI
run: |
pip install awscli==1.25.27
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
Expand Down

0 comments on commit 1978ddd

Please sign in to comment.