debian-mirror-gitlab/lib/gitlab/ci/templates/Jobs/Test.gitlab-ci.yml
2020-05-24 23:13:21 +05:30

23 lines
583 B
YAML

test:
variables:
POSTGRES_VERSION: 9.6.16
POSTGRES_DB: test
services:
- "postgres:${POSTGRES_VERSION}"
stage: test
image: gliderlabs/herokuish:latest
needs: []
script:
- |
if [ -z ${KUBERNETES_PORT+x} ]; then
DB_HOST=postgres
else
DB_HOST=localhost
fi
- export DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:5432/${POSTGRES_DB}"
- cp -R . /tmp/app
- /bin/herokuish buildpack test
rules:
- if: '$TEST_DISABLED'
when: never
- if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'