mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
Add tox target to detect schema changes
Fetches reference schema from public bucket Still need define method for updating reference schema on merge.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
# Ignore generated schema
|
||||
swagger.json
|
||||
schema.json
|
||||
reference-schema.json
|
||||
|
||||
# Tags
|
||||
.tags
|
||||
|
||||
14
Makefile
14
Makefile
@@ -84,6 +84,11 @@ clean-venv:
|
||||
clean-dist:
|
||||
rm -rf dist
|
||||
|
||||
clean-schema:
|
||||
rm -rf swagger.json
|
||||
rm -rf schema.json
|
||||
rm -rf reference-schema.json
|
||||
|
||||
# Remove temporary build files, compiled Python files.
|
||||
clean: clean-ui clean-dist
|
||||
rm -rf awx/public
|
||||
@@ -566,6 +571,15 @@ docker-compose-runtest:
|
||||
docker-compose-build-swagger:
|
||||
cd tools && CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm --service-ports awx /start_tests.sh swagger
|
||||
|
||||
docker-compose-genschema:
|
||||
cd tools && CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm --service-ports awx /start_tests.sh genschema
|
||||
mv swagger.json schema.json
|
||||
|
||||
docker-compose-validate-schema:
|
||||
$(MAKE) docker-compose-genschema
|
||||
curl https://s3.amazonaws.com/awx-public-ci-files/schema.json -o reference-schema.json
|
||||
diff -u schema.json reference-schema.json
|
||||
|
||||
docker-compose-clean:
|
||||
cd tools && CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm -w /awx_devel --service-ports awx make clean
|
||||
cd tools && TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose rm -sf
|
||||
|
||||
8
tox.ini
8
tox.ini
@@ -6,6 +6,7 @@ envlist =
|
||||
api,
|
||||
ui,
|
||||
swagger,
|
||||
validate-schema,
|
||||
|
||||
[testenv]
|
||||
;basepython = python2.7
|
||||
@@ -71,3 +72,10 @@ deps =
|
||||
commands =
|
||||
make docker-compose-build
|
||||
make docker-compose-build-swagger
|
||||
|
||||
[testenv:validate-schema]
|
||||
deps =
|
||||
nodeenv
|
||||
commands =
|
||||
make docker-compose-build
|
||||
make docker-compose-validate-schema
|
||||
|
||||
Reference in New Issue
Block a user