Skip to content

Commit

Permalink
Update DANDI dev tests (#504)
Browse files Browse the repository at this point in the history
* try to update dandi test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update dandi_dev.yml

* suppress other tests to save resources

* debug

* suppress other tests to save resources

* fix concurrency

* try swapping install pattern

* Update dandi-dev.yml

* Update dandi-dev.yml

* Update dandi-dev.yml

* try centralizing action

* fix syntax

* include latest release

* include latest release

* add pin to release as well

* fix

* release others

* send to all

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: CodyCBakerPhD <[email protected]>
  • Loading branch information
3 people authored Sep 6, 2024
1 parent 27e4d25 commit d55a34c
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 89 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dailies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/dandi-dev-live-services.yml
Original file line number Diff line number Diff line change
@@ -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
35 changes: 35 additions & 0 deletions .github/workflows/dandi-dev.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -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
38 changes: 0 additions & 38 deletions .github/workflows/dandi_dev.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/dandi_dev_live_service.yml

This file was deleted.

17 changes: 8 additions & 9 deletions .github/workflows/deploy-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
assess-file-changes:
uses: catalystneuro/neuroconv/.github/workflows/assess-file-changes.yml@main

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d55a34c

Please sign in to comment.