File tree Expand file tree Collapse file tree 4 files changed +55
-14
lines changed Expand file tree Collapse file tree 4 files changed +55
-14
lines changed Original file line number Diff line number Diff line change 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
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Testing
22on :
33 schedule :
44 - cron : " 0 0 * * *" # daily
5- pull_request :
5+ workflow_call :
66
77jobs :
88 build-and-test :
You can’t perform that action at this time.
0 commit comments