Merge pull request #2774 from charltonaustin/fix_postgres_ci_tests

feat(Makefile): add in new postgres target
This commit is contained in:
Charlton Austin 2017-07-12 15:51:36 -04:00 committed by GitHub
commit d5d0887c0f

View file

@ -47,6 +47,23 @@ test: unit test/registry_tests.py
TEST=true PYTHONPATH="." py.test --timeout=3600 --verbose --show-count -x \
test/registry_tests.py
PG_PASSWORD := quay
PG_USER := quay
PG_HOST := postgresql://$(PG_USER):$(PG_PASSWORD)@localhost/quay
test_postgres : TEST_ENV := SKIP_DB_SCHEMA=true TEST=true \
TEST_DATABASE_URI=$(PG_HOST) PYTHONPATH=.
test_postgres:
docker rm -f postgres-testrunner-postgres || true
docker run --name postgres-testrunner-postgres \
-e POSTGRES_PASSWORD=$(PG_PASSWORD) -e POSTGRES_USER=${PG_USER} \
-p 5432:5432 -d postgres:9.2
until pg_isready -d $(PG_HOST); do sleep 1; echo "Waiting for postgres"; done
$(TEST_ENV) alembic upgrade head
$(TEST_ENV) py.test --timeout=7200 --verbose --show-count ./ --color=no \
--ignore=endpoints/appr/test/ -x
docker rm -f postgres-testrunner-postgres || true
WEBPACK := node_modules/.bin/webpack
$(WEBPACK): package.json