.gitlab-ci.yml 1.76 KB
Newer Older
Moshe Weitzman's avatar
Moshe Weitzman committed
1 2 3 4 5 6
test:
  stage: test
  image: docker:latest
  services:
    - docker:dind
  variables:
Moshe Weitzman's avatar
Moshe Weitzman committed
7
    DOCKER_DRIVER: overlay2
8 9
    # https://github.com/docker/compose/issues/5696
    COMPOSE_INTERACTIVE_NO_CLI: 1
10 11
    SYMFONY_DEPRECATIONS_HELPER: disabled
    DRUPAL_CORE_CONSTRAINT: ^9
Moshe Weitzman's avatar
Moshe Weitzman committed
12 13
  before_script:
    - apk add --no-cache py-pip
Moshe Weitzman's avatar
Moshe Weitzman committed
14 15
      # Pin docker-compose version to stop installation error https://gitlab.com/gitlab-com/support-forum/issues/4421
    - pip install docker-compose~=1.23.0
Moshe Weitzman's avatar
Moshe Weitzman committed
16
    - docker-compose up -d
Moshe Weitzman's avatar
Moshe Weitzman committed
17
  script:
18 19 20 21 22
    # Accept a constraint for Drupal core version.
    - docker-compose exec -T drupal composer require --dev --no-update drupal/core-recommended:$DRUPAL_CORE_CONSTRAINT
    - docker-compose exec -T drupal composer require --dev --no-update drupal/core-dev:$DRUPAL_CORE_CONSTRAINT
    - docker-compose exec -T drupal composer require --dev --no-update drupal/core-composer-scaffold:$DRUPAL_CORE_CONSTRAINT
    - docker-compose exec -T drupal composer install -n --prefer-dist --no-suggest --no-progress
23 24
    - docker-compose exec -T drupal composer lint
    - docker-compose exec -T drupal composer cs
25
    - docker-compose exec -T drupal mkdir web/sites/simpletest
26
    - docker-compose exec -T drupal composer si
27 28
    # For easier debugging.
    - docker-compose exec -T drupal vendor/bin/drush status
Moshe Weitzman's avatar
Moshe Weitzman committed
29
    - docker-compose exec -T drupal chown -R www-data:www-data .
30
    - docker-compose exec --env SYMFONY_DEPRECATIONS_HELPER=$SYMFONY_DEPRECATIONS_HELPER -T drupal composer unit -- --log-junit web/sites/simpletest/browser_output/junit.xml
31 32
  artifacts:
    when: on_failure
33 34
    expire_in: 3 mos
    expose_as: web-vendor-browser-output
35 36 37 38
    reports:
      junit: web/sites/simpletest/browser_output/junit.xml
    paths:
      - web/sites/simpletest/browser_output
39 40
      - vendor
      - web