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

ci: Test on both main and dev validator branches #474

Merged
merged 3 commits into from
Nov 11, 2024
Merged
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
33 changes: 25 additions & 8 deletions .github/workflows/validate_datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
bids-validator: [stable, dev, legacy]
bids-validator: [stable, main, dev, legacy]

runs-on: ${{ matrix.platform }}

Expand Down Expand Up @@ -49,14 +49,22 @@ jobs:
deno install -Agf -n bids-validator jsr:@bids/validator
shell: bash

- name: Install BIDS validator (dev)
if: matrix.bids-validator == 'dev'
- name: Install BIDS validator (main)
if: matrix.bids-validator == 'main'
run: |
# If unmerged validator PRs are needed for testing, you can use
# https://github.com/<FORK>/bids-validator/raw/<BRANCH>/bids-validator/src/bids-validator.ts
deno install -Agf https://github.com/bids-standard/bids-validator/raw/deno-build/bids-validator.js
shell: bash

- name: Install BIDS validator (dev)
if: matrix.bids-validator == 'dev'
run: |
git clone -b dev https://github.com/bids-standard/bids-validator/ ../bids-validator
cd ../bids-validator
deno compile -A -o $HOME/.deno/bin/bids-validator src/bids-validator.ts
shell: bash

- name: Install BIDS validator (legacy)
if: "matrix.bids-validator == 'legacy'"
run: |
Expand Down Expand Up @@ -87,17 +95,26 @@ jobs:
fi
shell: bash

- name: Skip MRS validation for legacy validator
- name: Skip legacy validation for post-legacy datasets
run: for DS in mrs_* dwi_deriv; do touch $DS/.SKIP_VALIDATION; done
if: matrix.bids-validator == 'legacy'
shell: bash

- name: Skip stable validation for datasets with unreleased features
run: for DS in dwi_deriv; do touch $DS/.SKIP_VALIDATION; done
if: matrix.bids-validator != 'dev'
shell: bash

- name: Set BIDS_SCHEMA variable for dev version
if: matrix.bids-validator == 'dev'
# When proposing new features, schema changes may be necessary.
# Update this URL to the schema.json from PRs to the spec, when needed.
# If this variable is unset, dev will generally track the latest development
# release of https://jsr.io/@bids/schema
run: echo BIDS_SCHEMA=https://bids-specification.readthedocs.io/en/latest/schema.json >> $GITHUB_ENV

- name: Validate all BIDS datasets using bids-validator
run: |
cat ./run_tests.sh
./run_tests.sh
shell: bash
env:
# When proposing new features, schema changes may be necessary.
# Update this URL to the schema.json from PRs to the spec, when needed.
BIDS_SCHEMA: https://bids-specification.readthedocs.io/en/latest/schema.json