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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
647 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
2021-02-22 17:27:13 +05:30
POSTGRES_USER: user
POSTGRES_PASSWORD: testing-password
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'