Skip to content

Commit

Permalink
Merge branch 'dev' into fix_pynwb_version_icephys
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD authored Sep 23, 2022
2 parents a1ee11a + 40a9885 commit 7045196
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 14 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/assess-file-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Assess file changes

on:
workflow_call:
# Map the workflow outputs to job outputs
outputs:
SOURCE_CHANGED:
description: "Whether or not the files under /src/ were changed."
value: ${{ jobs.build.outputs.SOURCE_CHANGED }}

jobs:
build:
runs-on: ubuntu-latest
# Map the job outputs to step outputs
outputs:
SOURCE_CHANGED: ${{ steps.source-changed.outputs.SOURCE_CHANGED }}

name: Test changed-files
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]

- name: Assess Source Code Changes
id: source-changed
run: |
echo "::set-output name=SOURCE_CHANGED::false"
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo $file
if [[ $file == "nwbinspector/"* || $file == "requirements"* || $file == "setup.py" || $file == "tests/"* ]]
then
echo "Source changed"
echo "::set-output name=SOURCE_CHANGED::true"
else
echo "Source not changed"
fi
done
13 changes: 0 additions & 13 deletions .github/workflows/black.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/deploy-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Deploy tests

on:
pull_request:

jobs:
assess-file-changes:
uses: neurodatawithoutborders/nwbinspector/.github/workflows/assess-file-changes.yml@dev

run-tests:
needs: assess-file-changes
if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }}
uses: neurodatawithoutborders/nwbinspector/.github/workflows/testing.yml@dev
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Testing
on:
schedule:
- cron: "0 0 * * *" # daily
pull_request:
workflow_call:

jobs:
build-and-test:
Expand Down

0 comments on commit 7045196

Please sign in to comment.