.gitlab-ci.yml 2.87 KB
Newer Older
1
2
include:
  - project: 't3o/t3olayout'
3
    ref: main
4
5
    file: '/Configuration/GitLab/t3o-builds.yml'

6
stages:
7
  - maintenance
8
9
10
11
12
  - dump
  - test
  - build
  - layout
  - deploy
Thomas Löffler's avatar
Thomas Löffler committed
13
  - badges
Thomas Löffler's avatar
Thomas Löffler committed
14

15
variables:
16
17
  GIT_STRATEGY: "none"
  GIT_SSL_NO_VERIFY: "true"
18
  STAGE_HOST: "extensions.typo3.dev"
19
20
  PRODUCTION_PORT: 22
  PRODUCTION_HOST: "t3o03.typo3server.ch"
21
  STAGE_USER: "extensions-stage"
22
  DUMP_EXCLUDE_TABLES_LIST: "be_groups,be_sessions,be_users,cf_cache_hash,cf_cache_hash_tags,cf_cache_imagesizes,cf_cache_imagesizes_tags,cf_cache_news_category,cf_cache_news_category_tags,cf_cache_pages,cf_cache_pages_tags,cf_cache_pagesection,cf_cache_pagesection_tags,cf_cache_rootline,cf_cache_rootline_tags,cf_extbase_datamapfactory_datamap,cf_extbase_datamapfactory_datamap_tags,cf_extbase_object,cf_extbase_object_tags,cf_extbase_reflection,cf_extbase_reflection_tags,cf_tx_solr,cf_tx_solr_configuration,cf_tx_solr_configuration_tags,cf_tx_solr_tags,fe_groups,fe_sessions,fe_users,sys_domain,sys_log,tx_solr_cache,tx_solr_cache_tags"
23
  ADDITIONAL_TABLE_EXCLUDES: "-e 'tx_terfe2_domain_model_author' -e 'tx_ter_extensiondetails' -e 'tx_terfe2_extension_*_mm'"
24

25
test:unit:
Thomas Löffler's avatar
Thomas Löffler committed
26
  stage: test
27
  image: php:7.4
28
  variables:
Thomas Löffler's avatar
Thomas Löffler committed
29
    GIT_STRATEGY: "clone"
Thomas Löffler's avatar
Thomas Löffler committed
30
  before_script:
31
32
33
34
35
36
37
    - set -xe
    - apt-get update -yqq
    - apt-get install git unzip zlib1g-dev libzip-dev -yqq
    - docker-php-ext-install zip
    - pecl install xdebug
    - docker-php-ext-enable xdebug
    - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
Thomas Löffler's avatar
Thomas Löffler committed
38
    - export TYPO3_PATH_WEB="$PWD/private"
39
    - composer config cache-dir /cache/composer
Thomas Löffler's avatar
Thomas Löffler committed
40
    - mkdir $TYPO3_PATH_WEB/fileadmin/ && touch $TYPO3_PATH_WEB/fileadmin/currentcoredata.json
Thomas Löffler's avatar
Thomas Löffler committed
41
  script:
42
    - composer install --ignore-platform-reqs
Thomas Löffler's avatar
Thomas Löffler committed
43
    - composer test:unit
Thomas Löffler's avatar
Thomas Löffler committed
44
  artifacts:
45
    expire_in: 15 mins
Thomas Löffler's avatar
Thomas Löffler committed
46
47
    reports:
      junit: build/*-report.xml
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

test:mutation:
  stage: test
  image: php:7.4
  variables:
    GIT_STRATEGY: "clone"
  before_script:
    - set -xe
    - apt-get update -yqq
    - apt-get install git unzip zlib1g-dev libzip-dev -yqq
    - docker-php-ext-install zip
    - pecl install xdebug
    - docker-php-ext-enable xdebug
    - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
    - export TYPO3_PATH_WEB="$PWD/private"
    - composer config cache-dir /cache/composer
    - mkdir $TYPO3_PATH_WEB/fileadmin/ && touch $TYPO3_PATH_WEB/fileadmin/currentcoredata.json
  script:
    - composer install --ignore-platform-reqs
67
68
69
70
71
72
73
74
75
76
    - ./vendor/bin/infection --min-msi=11 --min-covered-msi=79 --threads=4 > log.txt

  after_script:
    - pip install anybadge
    - mkdir badges
    - cd badges
    - mutation_msi=$(cat log.txt | grep 'Covered Code MSI' | cut -d ' ' -f 13)
    - anybadge -l "Mutation" -v $mutation_msi -f mutation_msi.svg -c orange
  artifacts:
    paths:
77
      - badges/mutation_msi.svg
78
    expire_in: 1 week