Save DB schema during test run (#891)

Places the output of `pg_dump --schema-only` into the saved build artifact as `schema.sql`

Closes #877
This commit is contained in:
Yuri Astrakhan 2020-05-26 14:30:27 -04:00 committed by GitHub
parent 19673b5592
commit cec49b23ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,6 +196,7 @@ jobs:
else
DB_SIZE_MB=$(docker-compose run --rm -u $(id -u):$(id -g) openmaptiles-tools psql.sh -qtAc 'select pg_database_size(current_database())/1024/1024;')
fi
docker-compose run --rm -u $(id -u):$(id -g) openmaptiles-tools pg_dump --schema-only > "${PROFILE_DIR}/schema.sql"
echo "$DB_SIZE_MB" > "${PROFILE_DIR}/db_size.tsv"
}