Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Check whether PRs GraphQL schema and the migrations are up to date

NyanKiyoshi6ccef859d2e2
diff --git a/.travis.yml b/.travis.yml
index a59c7d24a7..0253312cb2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,6 +40,10 @@ matrix:
python: "3.6"
- env: TOXENV=flake8
python: "3.6"
+ - env: TOXENV=check_gql_schema
+ python: "3.6"
+ - env: TOXENV=check_migrations
+ python: "3.6"
allow_failures:
- python: "3.6"
env: DJANGO="master"
diff --git a/tox.ini b/tox.ini
index ed7085895b..966b38da22 100644
--- a/tox.ini
+++ b/tox.ini
@@ -30,6 +30,20 @@ deps =
commands =
flake8 saleor tests
+[testenv:check_gql_schema]
+basepython = python3.6
+whitelist_externals = sh
+commands =
+ sh -c './manage.py get_graphql_schema | diff saleor/graphql/schema.graphql -'
+
+[testenv:check_migrations]
+basepython = python3.6
+whitelist_externals = psql
+commands =
+ psql -c "CREATE DATABASE saleor;" -U postgres
+ python manage.py migrate
+ python manage.py makemigrations --dry-run --check
+
[travis]
python =
3.6: py36