Skip to content

Commit 7045196

Browse files
Merge branch 'dev' into fix_pynwb_version_icephys
2 parents a1ee11a + 40a9885 commit 7045196

File tree

4 files changed

+55
-14
lines changed

4 files changed

+55
-14
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Assess file changes
2+
3+
on:
4+
workflow_call:
5+
# Map the workflow outputs to job outputs
6+
outputs:
7+
SOURCE_CHANGED:
8+
description: "Whether or not the files under /src/ were changed."
9+
value: ${{ jobs.build.outputs.SOURCE_CHANGED }}
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
# Map the job outputs to step outputs
15+
outputs:
16+
SOURCE_CHANGED: ${{ steps.source-changed.outputs.SOURCE_CHANGED }}
17+
18+
name: Test changed-files
19+
steps:
20+
- uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Get changed files
25+
id: changed-files
26+
uses: tj-actions/[email protected]
27+
28+
- name: Assess Source Code Changes
29+
id: source-changed
30+
run: |
31+
echo "::set-output name=SOURCE_CHANGED::false"
32+
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
33+
echo $file
34+
if [[ $file == "nwbinspector/"* || $file == "requirements"* || $file == "setup.py" || $file == "tests/"* ]]
35+
then
36+
echo "Source changed"
37+
echo "::set-output name=SOURCE_CHANGED::true"
38+
else
39+
echo "Source not changed"
40+
fi
41+
done

.github/workflows/black.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/deploy-tests.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Deploy tests
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
assess-file-changes:
8+
uses: neurodatawithoutborders/nwbinspector/.github/workflows/assess-file-changes.yml@dev
9+
10+
run-tests:
11+
needs: assess-file-changes
12+
if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }}
13+
uses: neurodatawithoutborders/nwbinspector/.github/workflows/testing.yml@dev

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Testing
22
on:
33
schedule:
44
- cron: "0 0 * * *" # daily
5-
pull_request:
5+
workflow_call:
66

77
jobs:
88
build-and-test:

0 commit comments

Comments
 (0)