From d340ffc49801d671d7ab763dcaf89df6c0a311cf Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 11 Nov 2024 14:07:40 -0500 Subject: [PATCH 1/3] ci: Test on both main and dev validator branches --- .github/workflows/validate_datasets.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/validate_datasets.yml b/.github/workflows/validate_datasets.yml index cab254ffa..9b0d25a91 100644 --- a/.github/workflows/validate_datasets.yml +++ b/.github/workflows/validate_datasets.yml @@ -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 }} @@ -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//bids-validator/raw//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: | From 57e55afe0b265f65b389af243069467db5e99405 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 11 Nov 2024 14:58:00 -0500 Subject: [PATCH 2/3] chore(ci): Do not override the schema for non-dev validators --- .github/workflows/validate_datasets.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate_datasets.yml b/.github/workflows/validate_datasets.yml index 9b0d25a91..90900fef3 100644 --- a/.github/workflows/validate_datasets.yml +++ b/.github/workflows/validate_datasets.yml @@ -100,12 +100,16 @@ jobs: if: matrix.bids-validator == 'legacy' 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 From b83704802c849ff8474e2703e3a2c366574d7712 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 11 Nov 2024 15:03:26 -0500 Subject: [PATCH 3/3] chore(ci): Skip stable validation for datasets with unreleased features --- .github/workflows/validate_datasets.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate_datasets.yml b/.github/workflows/validate_datasets.yml index 90900fef3..b9d1ae6f1 100644 --- a/.github/workflows/validate_datasets.yml +++ b/.github/workflows/validate_datasets.yml @@ -95,11 +95,16 @@ 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.