1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-11-25 23:58:18 +01:00

.travis.yml: Use PostgreSQL directly

It seems that Travis CI already has a PostgreSQL service running.
This commit is contained in:
Alan Orth 2018-11-11 16:35:28 +02:00
parent 1959e8154e
commit 766b77a3b6
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -4,16 +4,13 @@ python:
- "3.6" - "3.6"
- "3.7-dev" - "3.7-dev"
sudo: required sudo: required
services: docker services: postgresql
before_install: before_script:
- docker pull postgres:9.5-alpine - psql --version
- docker run -d --name dspacestatistics -p 127.0.0.1:5432:5432 postgres:9.5-alpine - createuser -U postgres dspacestatistics
- docker ps -a - psql -U postgres -c "ALTER USER dspacestatistics WITH PASSWORD 'dspacestatistics'"
- docker exec dspacestatistics createuser -U postgres dspacestatistics - createdb -U postgres -O dspacestatistics --encoding=UNICODE dspacestatistics
- docker exec dspacestatistics psql -U postgres -c "ALTER USER dspacestatistics WITH PASSWORD 'dspacestatistics'" - psql -U postgres -d dspacestatistics < tests/dspacestatistics.sql
- docker exec dspacestatistics createdb -U postgres -O dspacestatistics --encoding=UNICODE dspacestatistics
- docker cp tests/dspacestatistics.sql dspacestatistics:/tmp
- docker exec dspacestatistics sh -c 'psql -U postgres -d dspacestatistics < /tmp/dspacestatistics.sql'
install: install:
- "pip install pipenv --upgrade-strategy=only-if-needed" - "pip install pipenv --upgrade-strategy=only-if-needed"
- "pipenv install --dev" - "pipenv install --dev"