From 5789d4cd91d5109cc582dc7c1483981a3983f63a Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 22 Sep 2022 13:14:27 -0400 Subject: [PATCH 1/7] Create deploy-tests.yml --- .github/deploy-tests.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/deploy-tests.yml diff --git a/.github/deploy-tests.yml b/.github/deploy-tests.yml new file mode 100644 index 000000000..d6dc523e2 --- /dev/null +++ b/.github/deploy-tests.yml @@ -0,0 +1,14 @@ + +name: Deploy tests + +on: + pull_request: + +jobs: + assess-file-changes: + uses: catalystneuro/neuroconv/.github/workflows/assess-file-changes.yml@main + + run-tests: + needs: assess-file-changes + if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }} + uses: neurodatawithoutborders/nwbinspector/.github/workflows/testing.yml@main From a85810f7d3c90c5bcc89f2b986ecc1183c24fbfa Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 22 Sep 2022 13:16:02 -0400 Subject: [PATCH 2/7] Rename .github/deploy-tests.yml to .github/workflows/deploy-tests.yml --- .github/{ => workflows}/deploy-tests.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/deploy-tests.yml (100%) diff --git a/.github/deploy-tests.yml b/.github/workflows/deploy-tests.yml similarity index 100% rename from .github/deploy-tests.yml rename to .github/workflows/deploy-tests.yml From ce06c6ceb9ee4e750584f1cb896dd4d6fce98c50 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 22 Sep 2022 13:16:32 -0400 Subject: [PATCH 3/7] Update testing.yml --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 69cc4900e..71c9c5453 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -2,7 +2,7 @@ name: Testing on: schedule: - cron: "0 0 * * *" # daily - pull_request: + workflow_call: jobs: build-and-test: From ce87bc31969f1b0b3469aac3fc50cef73e9977d5 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 22 Sep 2022 13:18:14 -0400 Subject: [PATCH 4/7] Create assess-file-changes.yml --- .github/workflows/assess-file-changes.yml | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/assess-file-changes.yml diff --git a/.github/workflows/assess-file-changes.yml b/.github/workflows/assess-file-changes.yml new file mode 100644 index 000000000..2ff5a5274 --- /dev/null +++ b/.github/workflows/assess-file-changes.yml @@ -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/changed-files@v29.0.4 + + - 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 From c8e34e019e3cabbcc6b5bbd17718b1b7ff6d0452 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 22 Sep 2022 13:18:46 -0400 Subject: [PATCH 5/7] Update deploy-tests.yml --- .github/workflows/deploy-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-tests.yml b/.github/workflows/deploy-tests.yml index d6dc523e2..3cf5a5db1 100644 --- a/.github/workflows/deploy-tests.yml +++ b/.github/workflows/deploy-tests.yml @@ -6,9 +6,9 @@ on: jobs: assess-file-changes: - uses: catalystneuro/neuroconv/.github/workflows/assess-file-changes.yml@main + uses: neurodatawithoutborders/nwbinspector/.github/workflows/assess-file-changes.yml@add_ci_deployment run-tests: needs: assess-file-changes if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }} - uses: neurodatawithoutborders/nwbinspector/.github/workflows/testing.yml@main + uses: neurodatawithoutborders/nwbinspector/.github/workflows/testing.yml@add_ci_deployment From 5e2f3d51a0afdd6e28037a49a3d22ef5e21ba724 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 22 Sep 2022 15:48:47 -0400 Subject: [PATCH 6/7] Update deploy-tests.yml --- .github/workflows/deploy-tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-tests.yml b/.github/workflows/deploy-tests.yml index 3cf5a5db1..1ff747652 100644 --- a/.github/workflows/deploy-tests.yml +++ b/.github/workflows/deploy-tests.yml @@ -1,4 +1,3 @@ - name: Deploy tests on: @@ -6,9 +5,9 @@ on: jobs: assess-file-changes: - uses: neurodatawithoutborders/nwbinspector/.github/workflows/assess-file-changes.yml@add_ci_deployment + 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@add_ci_deployment + uses: neurodatawithoutborders/nwbinspector/.github/workflows/testing.yml@dev From 40a9885210e8160d8899cf4cee756cbe46bf7953 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Thu, 22 Sep 2022 15:52:30 -0400 Subject: [PATCH 7/7] Delete black.yml --- .github/workflows/black.yml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .github/workflows/black.yml diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml deleted file mode 100644 index 0ff667146..000000000 --- a/.github/workflows/black.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: black - -on: pull_request - -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.3 - with: - extra_args: black