diff --git a/.gitignore b/.gitignore index 8b0b664..f495d40 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,8 @@ # isnt' parsed by the GitHub Action: /deno.lock +# NPM (for AJV): +/node_modules +/package-lock.json +/package.json + diff --git a/test.sh b/test.sh index 134b7cf..41c17c9 100755 --- a/test.sh +++ b/test.sh @@ -2,7 +2,14 @@ deno task run-tests +# install AJV: +npm init -y +npm install ajv +npm install ajv-cli +npm install ajv-formats + +# validate schema using AJV: TS_LIONCORE_M3_SCHEMA=../repos/lionweb-typescript/packages/artifacts/schemas/lioncore_m3.serialization.schema.json JAVA_LIONCORE_SERIALIZATION=../repos/lionweb-java/core/src/test/resources/serialization/lioncore.json -npx ajv -c ajv-formats --spec=draft2020 --strict=true --allErrors=true --allowUnionTypes=true test -s $TS_LIONCORE_M3_SCHEMA -d $JAVA_LIONCORE_SERIALIZATION --valid +./node_modules/.bin/ajv -c ajv-formats --spec=draft2020 --strict=true --allErrors=true --allowUnionTypes=true test -s $TS_LIONCORE_M3_SCHEMA -d $JAVA_LIONCORE_SERIALIZATION --valid