2018-11-16 11:26:46 +01:00
|
|
|
image: archlinux
|
|
|
|
packages:
|
|
|
|
- python-pipenv
|
2018-11-16 15:35:06 +01:00
|
|
|
- postgresql
|
2018-11-16 11:26:46 +01:00
|
|
|
sources:
|
|
|
|
- https://git.sr.ht/~alanorth/dspace-statistics-api
|
|
|
|
tasks:
|
|
|
|
- setup: |
|
2018-11-16 15:35:06 +01:00
|
|
|
id
|
|
|
|
psql --version
|
|
|
|
sudo su - postgres -c "initdb --locale en_US.UTF-8 -E UTF8 -D '/var/lib/postgres/data'"
|
|
|
|
sudo systemctl start postgresql
|
|
|
|
createuser -U postgres dspacestatistics
|
|
|
|
psql -U postgres -c "ALTER USER dspacestatistics WITH PASSWORD 'dspacestatistics'"
|
|
|
|
createdb -U postgres -O dspacestatistics --encoding=UNICODE dspacestatistics
|
2018-11-16 11:26:46 +01:00
|
|
|
cd dspace-statistics-api
|
2019-02-07 16:25:19 +01:00
|
|
|
psql -U postgres -d dspacestatistics < tests/dspacestatistics.sql
|
2018-11-16 15:35:06 +01:00
|
|
|
pipenv install --dev
|
|
|
|
- test: |
|
2018-11-16 11:26:46 +01:00
|
|
|
cd dspace-statistics-api
|
|
|
|
pipenv run pytest
|
2019-03-17 22:39:38 +01:00
|
|
|
environment:
|
|
|
|
PIPENV_NOSPIN: 'True'
|
|
|
|
PIPENV_HIDE_EMOJIS: 'True'
|