debian-mirror-gitlab/lib/gitlab/ci/templates/Jobs/Test.gitlab-ci.yml

24 lines
583 B
YAML
Raw Normal View History

2019-07-07 11:18:12 +05:30
test:
variables:
2020-05-24 23:13:21 +05:30
POSTGRES_VERSION: 9.6.16
2019-07-07 11:18:12 +05:30
POSTGRES_DB: test
2020-05-24 23:13:21 +05:30
services:
- "postgres:${POSTGRES_VERSION}"
2019-07-07 11:18:12 +05:30
stage: test
image: gliderlabs/herokuish:latest
2020-05-24 23:13:21 +05:30
needs: []
2019-07-07 11:18:12 +05:30
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
2020-05-24 23:13:21 +05:30
rules:
- if: '$TEST_DISABLED'
when: never
- if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'