diff --git a/.github/workflows/dailies.yml b/.github/workflows/dailies.yml index 0a579039a..3716ab909 100644 --- a/.github/workflows/dailies.yml +++ b/.github/workflows/dailies.yml @@ -16,13 +16,13 @@ jobs: uses: neurodatawithoutborders/nwbinspector/.github/workflows/doc-link-checks.yml@dev test-dandi-latest: - uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi_release.yml@dev + uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi-release.yml@dev test-dandi-dev: - uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi_dev.yml@dev + uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi-dev.yml@dev test-dandi-dev-live: - uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi_dev_live_service.yml@dev + uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi-dev-live-services.yml@dev notify: runs-on: ubuntu-latest diff --git a/.github/workflows/dandi-dev-live-services.yml b/.github/workflows/dandi-dev-live-services.yml new file mode 100644 index 000000000..0f17fb43a --- /dev/null +++ b/.github/workflows/dandi-dev-live-services.yml @@ -0,0 +1,32 @@ +name: Test against DANDI dev branch - all tests, including live services +on: workflow_call + +jobs: + build-and-test: + name: Testing against current DANDI release and dev branch + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - name: Checkout local branch of source repository + uses: actions/checkout@v4 + - run: git fetch --prune --unshallow --tags + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Test against DANDI dev + run: | + pip install virtualenv + virtualenv --system-site-packages --python=python3 venvs/dandi_dev_tests + source venvs/dandi_dev_tests/bin/activate + pip install -e .[dandi] + cd .. + git clone https://github.com/dandi/dandi-cli + cd dandi-cli + pip install -e .[test] + pip install hdmf==3.14.3 # temporary: https://github.com/dandi/dandi-cli/issues/1494 + pytest -vv diff --git a/.github/workflows/dandi-dev.yml b/.github/workflows/dandi-dev.yml new file mode 100644 index 000000000..0e7692270 --- /dev/null +++ b/.github/workflows/dandi-dev.yml @@ -0,0 +1,35 @@ +name: Test against DANDI dev branch - no network +on: workflow_call + +env: + DANDI_TESTS_NONETWORK: "1" + +jobs: + build-and-test: + name: Testing against current DANDI release and dev branch + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - name: Checkout local branch of source repository + uses: actions/checkout@v4 + - run: git fetch --prune --unshallow --tags + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Test local branch of NWB Inspector against DANDI dev branch + run: | + pip install virtualenv + virtualenv --system-site-packages --python=python3 venvs/dandi_dev_tests + source venvs/dandi_dev_tests/bin/activate + pip install -e .[dandi] + cd .. + git clone https://github.com/dandi/dandi-cli + cd dandi-cli + pip install -e .[test] + pip install hdmf==3.14.3 # temporary: https://github.com/dandi/dandi-cli/issues/1494 + pytest -rsx diff --git a/.github/workflows/dandi_release.yml b/.github/workflows/dandi-release.yml similarity index 77% rename from .github/workflows/dandi_release.yml rename to .github/workflows/dandi-release.yml index 7697a71dc..cf7fa9ee5 100644 --- a/.github/workflows/dandi_release.yml +++ b/.github/workflows/dandi-release.yml @@ -1,4 +1,4 @@ -name: Test against latest DANDI release - no network +name: Run NWB Inspector tests against latest DANDI release - no network on: workflow_call env: @@ -25,7 +25,7 @@ jobs: - '3.11' steps: - - name: Set up environment + - name: Checkout local branch of source repository uses: actions/checkout@v4 with: # Fetch all commits so that versioneer will return something compatible @@ -43,7 +43,9 @@ jobs: pip install "dandi[extras,test]" - name: Install this branch of NWB Inspector - run: pip install -e . + run: | + pip install -e . + pip install hdmf==3.14.3 # temporary: https://github.com/dandi/dandi-cli/issues/1494 - name: Run all NWB Inspector tests - run: python -m pytest -s -v + run: pytest -rsx diff --git a/.github/workflows/dandi_dev.yml b/.github/workflows/dandi_dev.yml deleted file mode 100644 index 315e85fdb..000000000 --- a/.github/workflows/dandi_dev.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Test against DANDI dev branch - no network -on: workflow_call - -env: - DANDI_TESTS_NONETWORK: "1" - -jobs: - build-and-test: - name: Testing against current DANDI release and dev branch - runs-on: ubuntu-latest - strategy: - fail-fast: false - steps: - - uses: s-weigand/setup-conda@v1 - with: - update-conda: true - python-version: 3.9 - conda-channels: conda-forge - - uses: actions/checkout@v3 - - run: git fetch --prune --unshallow --tags - - - name: Test against DANDI dev - run: | - pip install virtualenv - git clone https://github.com/NeurodataWithoutBorders/nwbinspector - git clone https://github.com/dandi/dandi-cli - cd dandi-cli - # Test against a specific branch or commit if needed - # git checkout a50c4fe243f9a3b72fbcecaea095943be02616d6 # error_fix branch with iteration issue - virtualenv --system-site-packages --python=python3 venvs/dev3 - source venvs/dev3/bin/activate - pip install -e .[test] - cd ../nwbinspector - # Test against a specific branch or commit if needed - # git checkout add_downstream_ci - pip install -e . - cd ../dandi-cli - pytest -vv diff --git a/.github/workflows/dandi_dev_live_service.yml b/.github/workflows/dandi_dev_live_service.yml deleted file mode 100644 index 85f765b14..000000000 --- a/.github/workflows/dandi_dev_live_service.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Test against DANDI dev branch - all tests, including live service -on: workflow_call - -jobs: - build-and-test: - name: Testing against current DANDI release and dev branch - runs-on: ubuntu-latest - strategy: - fail-fast: false - steps: - - uses: s-weigand/setup-conda@v1 - with: - update-conda: true - python-version: 3.9 - conda-channels: conda-forge - - uses: actions/checkout@v3 - - run: git fetch --prune --unshallow --tags - - - name: Test against DANDI dev - run: | - pip install virtualenv - git clone https://github.com/NeurodataWithoutBorders/nwbinspector - git clone https://github.com/dandi/dandi-cli - cd dandi-cli - # Test against a specific branch or commit if needed - # git checkout a50c4fe243f9a3b72fbcecaea095943be02616d6 # error_fix branch with iteration issue - virtualenv --system-site-packages --python=python3 venvs/dev3 - source venvs/dev3/bin/activate - pip install -e .[test] - cd ../nwbinspector - # Test against a specific branch or commit if needed - # git checkout add_downstream_ci - pip install -e . - cd ../dandi-cli - pytest -vv diff --git a/.github/workflows/deploy-tests.yml b/.github/workflows/deploy-tests.yml index b8de4531b..38505e729 100644 --- a/.github/workflows/deploy-tests.yml +++ b/.github/workflows/deploy-tests.yml @@ -3,13 +3,12 @@ name: Deploy tests on: pull_request: -jobs: - cancel-previous-runs: - runs-on: ubuntu-latest - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.11.0 +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: assess-file-changes: uses: catalystneuro/neuroconv/.github/workflows/assess-file-changes.yml@main @@ -58,17 +57,17 @@ jobs: test-dandi-latest: needs: assess-file-changes if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }} - uses: ./.github/workflows/dandi_release.yml + uses: ./.github/workflows/dandi-release.yml test-dandi-dev: needs: assess-file-changes if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }} - uses: ./.github/workflows/dandi_dev.yml + uses: ./.github/workflows/dandi-dev.yml test-dandi-dev-live: needs: assess-file-changes if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }} - uses: ./.github/workflows/dandi_dev_live_service.yml + uses: ./.github/workflows/dandi-dev-live-services.yml check-final-status: name: All tests passing