2018-11-16 11:26:46 +01:00
|
|
|
image: archlinux
|
|
|
|
packages:
|
2020-10-05 21:37:42 +02:00
|
|
|
- python-poetry
|
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
|
2020-10-05 21:37:42 +02:00
|
|
|
poetry install --no-root
|
2018-11-16 15:35:06 +01:00
|
|
|
- test: |
|
2018-11-16 11:26:46 +01:00
|
|
|
cd dspace-statistics-api
|
2020-10-05 21:37:42 +02:00
|
|
|
poetry run pytest
|