Add Concourse CI configs
This commit is contained in:
parent
5a06530b43
commit
66c8153d72
7 changed files with 272 additions and 0 deletions
24
ci/tasks/postgres.yaml
Normal file
24
ci/tasks/postgres.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
platform: linux
|
||||
inputs:
|
||||
- name: quay-pull-request
|
||||
run:
|
||||
path: /bin/sh
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
set -eux
|
||||
export TEST=true
|
||||
export TEST_DATABASE_URI='postgresql://quay:quay@127.0.0.1/quaytest'
|
||||
export SKIP_DB_SCHEMA=true
|
||||
pip install --quiet -r quay-pull-request/requirements.txt
|
||||
pip install --quiet -r quay-pull-request/requirements-tests.txt
|
||||
service postgresql start
|
||||
su postgres -c "createuser --echo --superuser --no-password quay"
|
||||
su postgres -c "psql -c \"ALTER USER quay WITH PASSWORD 'quay';\""
|
||||
su postgres -c "psql -c 'CREATE DATABASE quaytest;'"
|
||||
su postgres -c "psql -c 'GRANT ALL PRIVILEGES ON DATABASE quaytest TO quay';"
|
||||
cd quay-pull-request
|
||||
PYTHONPATH="." alembic upgrade head
|
||||
PYTHONPATH="." python -m unittest discover -f
|
||||
service postgresql stop
|
Reference in a new issue