From 26a2e4a873065af755b188ca3df01905bfbe0a32 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 3 Feb 2021 18:50:11 +0000 Subject: [PATCH] Move and more aptly name check_examples.py scripts --- .circleci/config.yml | 8 +++----- .../check-event-schema-examples.py | 0 api/check_examples.py => scripts/check-swagger-sources.py | 0 scripts/test-and-build.sh | 6 +++--- 4 files changed, 6 insertions(+), 8 deletions(-) rename event-schemas/check_examples.py => scripts/check-event-schema-examples.py (100%) rename api/check_examples.py => scripts/check-swagger-sources.py (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index bf4404ce..274dc007 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,9 +5,10 @@ gendoc: &gendoc scripts/gendoc.py genswagger: &genswagger - name: Generate the swagger + name: Validate sources and generate swagger json command: | source /env/bin/activate + scripts/check-swagger-sources.py scripts/dump-swagger.py buildswaggerui: &buildswaggerui @@ -27,10 +28,7 @@ checkexamples: &checkexamples name: Check Event Examples command: | source /env/bin/activate - cd event-schemas - ./check_examples.py - cd ../api - ./check_examples.py + scripts/check-event-schema-examples.py genmatrixassets: &genmatrixassets name: Generate/Verify matrix.org assets diff --git a/event-schemas/check_examples.py b/scripts/check-event-schema-examples.py similarity index 100% rename from event-schemas/check_examples.py rename to scripts/check-event-schema-examples.py diff --git a/api/check_examples.py b/scripts/check-swagger-sources.py similarity index 100% rename from api/check_examples.py rename to scripts/check-swagger-sources.py diff --git a/scripts/test-and-build.sh b/scripts/test-and-build.sh index f45e2da6..f4c3a90f 100755 --- a/scripts/test-and-build.sh +++ b/scripts/test-and-build.sh @@ -14,9 +14,9 @@ pip --version pip install -r scripts/requirements.txt # do sanity checks on the examples and swagger -(cd event-schemas/ && ./check_examples.py) -(cd api && ./check_examples.py) -(cd api && npm install && node validator.js -s "client-server") +scripts/check-event-schema-examples.py +scripts/check-swagger-sources.py +(cd event-schemas/api && npm install && node validator.js -s "client-server") : ${GOPATH:=${WORKSPACE}/.gopath} mkdir -p "${GOPATH}"