Skip to content

Commit 45c98fa

Browse files
authored
Merge pull request bids-standard#474 from effigies/ci/dev-branch
ci: Test on both main and dev validator branches
2 parents d549036 + b837048 commit 45c98fa

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

.github/workflows/validate_datasets.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
platform: [ubuntu-latest, macos-latest, windows-latest]
24-
bids-validator: [stable, dev, legacy]
24+
bids-validator: [stable, main, dev, legacy]
2525

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

@@ -49,14 +49,22 @@ jobs:
4949
deno install -Agf -n bids-validator jsr:@bids/validator
5050
shell: bash
5151

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

60+
- name: Install BIDS validator (dev)
61+
if: matrix.bids-validator == 'dev'
62+
run: |
63+
git clone -b dev https://github.com/bids-standard/bids-validator/ ../bids-validator
64+
cd ../bids-validator
65+
deno compile -A -o $HOME/.deno/bin/bids-validator src/bids-validator.ts
66+
shell: bash
67+
6068
- name: Install BIDS validator (legacy)
6169
if: "matrix.bids-validator == 'legacy'"
6270
run: |
@@ -87,17 +95,26 @@ jobs:
8795
fi
8896
shell: bash
8997

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

103+
- name: Skip stable validation for datasets with unreleased features
104+
run: for DS in dwi_deriv; do touch $DS/.SKIP_VALIDATION; done
105+
if: matrix.bids-validator != 'dev'
106+
shell: bash
107+
108+
- name: Set BIDS_SCHEMA variable for dev version
109+
if: matrix.bids-validator == 'dev'
110+
# When proposing new features, schema changes may be necessary.
111+
# Update this URL to the schema.json from PRs to the spec, when needed.
112+
# If this variable is unset, dev will generally track the latest development
113+
# release of https://jsr.io/@bids/schema
114+
run: echo BIDS_SCHEMA=https://bids-specification.readthedocs.io/en/latest/schema.json >> $GITHUB_ENV
115+
95116
- name: Validate all BIDS datasets using bids-validator
96117
run: |
97118
cat ./run_tests.sh
98119
./run_tests.sh
99120
shell: bash
100-
env:
101-
# When proposing new features, schema changes may be necessary.
102-
# Update this URL to the schema.json from PRs to the spec, when needed.
103-
BIDS_SCHEMA: https://bids-specification.readthedocs.io/en/latest/schema.json

0 commit comments

Comments
 (0)