-
Notifications
You must be signed in to change notification settings - Fork 137
120 lines (102 loc) · 3.56 KB
/
validate_datasets.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
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, main, 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 (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: |
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 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