From a34c2db11035bfc7325aa567c5055af6c409afbd Mon Sep 17 00:00:00 2001 From: Meinte Boersma Date: Fri, 10 Nov 2023 14:06:38 +0100 Subject: [PATCH] work around npx not being available in a GitHub Action --- .gitignore | 5 +++++ test.sh | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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