mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-25 23:58:18 +01:00
Alan Orth
842f80036f
When building on sr.ht the default environment is the home directory so we need to change to the source directory before trying to import the SQL file.
22 lines
720 B
YAML
22 lines
720 B
YAML
image: archlinux
|
|
packages:
|
|
- python-pipenv
|
|
- postgresql
|
|
sources:
|
|
- https://git.sr.ht/~alanorth/dspace-statistics-api
|
|
tasks:
|
|
- setup: |
|
|
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
|
|
cd dspace-statistics-api
|
|
psql -U postgres -d dspacestatistics < tests/dspacestatistics.sql
|
|
pipenv install --dev
|
|
- test: |
|
|
cd dspace-statistics-api
|
|
pipenv run pytest
|