chill-bundles/.gitlab-ci.yml

45 lines
1.1 KiB
YAML

services:
- chill/database:latest
stages:
- build-doc
- deploy-doc
- test
before_script:
- composer config github-oauth.github.com $GITHUB_TOKEN
- composer install
- cp Tests/Fixtures/App/config/parameters.gitlab-ci.yml Tests/Fixtures/App/config/parameters.yml
- php Tests/Fixtures/App/console --env=test cache:warmup
- php Tests/Fixtures/App/console doctrine:migrations:migrate --env=test --no-interaction
- php Tests/Fixtures/App/console doctrine:fixtures:load --env=test --no-interaction
test:php-5.6:
stage: test
environment: testing
image: chill/ci-image:php-5.6
script: phpunit
test:php-7:
stage: test
environment: testing
image: chill/ci-image:php-7
script: phpunit
# deploy documentation
api-doc-build:
stage: build-doc
environment: api-doc
image: chill/ci-image:php-7
before_script:
- mkdir api-doc
script: apigen generate --destination api-doc/$CI_PROJECT_NAME/$CI_BUILD_REF_NAME
artifacts:
paths:
- "api-doc/"
name: api
expire_in: '2h'
only:
- master
- tags