diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index fe4bbdf3..af53594f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -29,3 +29,6 @@ jobs: - name: Test example in the README.md run: bash <(sed -n -e '/^ *#!/,/^```$/p' README.md | grep -v '```') + + - name: Test that the monolythic example is identical to the step by step + run: scripts/tests/test_README_versions diff --git a/README.md b/README.md index e259306e..e48b57a6 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,7 @@ datalad install -d . -s ///repronim/containers code/containers Now let's take a look at what we have. -```bash +```shell /ds000003-qc # The root dataset contains everything |--/sourcedata # we call it source, but it is actually ds000003-demo |--/code/containers # repronim/containers, this is where our non-custom code lives @@ -246,7 +246,7 @@ datalad run -m "Downgrade/Freeze mriqc container version" \ **Option 2: ///repronim/containers** -```bash +```shell # Run from ~/my-experiments/ds000003-qc/containers datalad run -m "Downgrade/Freeze mriqc container version" \ code/containers/scripts/freeze_versions bids-mriqc=0.16.0 diff --git a/scripts/tests/test_README_versions b/scripts/tests/test_README_versions new file mode 100755 index 00000000..6d8a7a40 --- /dev/null +++ b/scripts/tests/test_README_versions @@ -0,0 +1,3 @@ +#!/bin/bash + +diff -Naur <(sed -n -e '/^ *#!/,/^```$/p' README.md | grep -v -E '^([()#]|PS4|cd .*mktemp|```)') <(sed -n -e '/Walkthrough/,/Do not change lines below/p' README.md | sed -n -e '/```bash/,/```/p' | grep -v -e '```' -e '~/my-experiments')