Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate workflows for testing dandi dev between live and no network #435

Merged
merged 6 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dailies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Daily workflows
on:
workflow_dispatch:
schedule:
- cron: "0 16 * * *" # Daily at noon EST
- cron: "0 14 * * *" # Daily at 10am EST

jobs:

Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/dandi_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test against DANDI dev branch
name: Test against DANDI dev branch - all tests, including live service
on: workflow_call

jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Test against latest DANDI release
name: Test against latest DANDI release - no network
on: workflow_call

env:
DANDI_TESTS_NONETWORK: "1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's just me, but at first I always read as "none twork" 😅

Suggested change
DANDI_TESTS_NONETWORK: "1"
DANDI_TESTS_NO_NETWORK: "1"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I completely agree - this is the name of the environment variable that must be set to have this effect on the DANDI testing suite, so I cannot change it here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah okay, thanks for the clarification!


jobs:
build-and-test:
name: Testing against current DANDI release and dev branch
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/deploy-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,17 @@ jobs:
test-dandi-latest:
needs: assess-file-changes
if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }}
uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi-release.yml@dev
uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi_release.yml@dev

test-dandi-dev:
needs: assess-file-changes
if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }}
uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi-dev.yml@dev
uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi_dev.yml@dev

test-dandi-dev-live:
needs: assess-file-changes
if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }}
uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi_dev_live_service.yml@dev

check-final-status:
name: All tests passing
Expand Down