Skip to content

redirect to BIDS website #1177

redirect to BIDS website

redirect to BIDS website #1177

name: validate_datasets
on:
push:
branches: ['**']
pull_request:
branches: ['**']
create:
branches: [master]
tags: ['**']
schedule:
- cron: "0 4 * * 1"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
bids-validator: [stable, dev, legacy]
runs-on: ${{ matrix.platform }}
env:
TZ: Europe/Berlin
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
if: matrix.bids-validator == 'legacy'
uses: actions/setup-node@v4
with:
node-version: 18
- uses: denoland/setup-deno@v2
if: matrix.bids-validator != 'legacy'
with:
deno-version: v2.x
- name: Install BIDS validator (stable)
if: matrix.bids-validator == 'stable'
run: |
deno install -Agf -n bids-validator jsr:@bids/validator
shell: bash
- name: Install BIDS validator (dev)
if: matrix.bids-validator == 'dev'
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 (legacy)
if: "matrix.bids-validator == 'legacy'"
run: |
npm install -g bids-validator
- name: Display versions and environment information
run: |
echo $TZ
date
which deno && echo "deno\n----" && deno --version || true
echo "node\n----"; node --version
echo "npm\n----"; npm --version
echo "bids-validator"; bids-validator --version
shell: bash
- name: Check that no large files are present
if: "matrix.bids-validator == 'stable'"
run: |
echo "Checking for big files ..."
found=`find . -not -path "./.git*" -type f -size +500k`
if [ "$found" == "" ]
then
echo "No big files present, great!"
else
echo "Found big files:"
echo "$found"
exit 1;
fi
shell: bash
- name: Skip MRS validation for legacy validator
run: for DS in mrs_* dwi_deriv; do touch $DS/.SKIP_VALIDATION; done
if: matrix.bids-validator == 'legacy'
shell: bash
- 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