include: - project: 'services/t3o-sites/common/t3o-basic-pipeline-jobs' ref: main file: 't3o-basic-pipeline-jobs.yml' stages: - maintenance - dump - test - build - layout - deploy - badges variables: GIT_STRATEGY: "none" GIT_SSL_NO_VERIFY: "true" STAGE_HOST: "extensions.typo3.dev" PRODUCTION_PORT: 22 PRODUCTION_HOST: "t3o03.typo3server.ch" STAGE_USER: "extensions-stage" 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" ADDITIONAL_TABLE_EXCLUDES: "-e 'tx_terfe2_domain_model_author' -e 'tx_ter_extensiondetails' -e 'tx_terfe2_extension_*_mm'" test:unit: 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-2.9.2 - 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 selfupdate --1 - composer install --ignore-platform-reqs - composer test:unit artifacts: expire_in: 15 mins reports: junit: build/*-report.xml test:mutation: stage: test image: php:7.4 variables: GIT_STRATEGY: "clone" allow_failure: true 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-2.9.2 - 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 selfupdate --2 - composer install --ignore-platform-reqs - ./vendor/bin/infection --min-msi=10 --min-covered-msi=75 --threads=4 retry: 2 artifacts: when: always paths: - build/infection-log.json expire_in: 30 min mutation:badge: stage: badges image: python:3.9 allow_failure: true before_script: - echo "Python other dependencies installation" - pip3 install anybadge - apt update -y - apt install -y jq bc - mkdir badges - cd badges script: - mutation_msi=$(cat ../build/infection-log.json | jq .stats.msi) - msi_color=$(../.gitlab-ci/build/./badge-color.sh $mutation_msi) - anybadge -l "Mutation MSI" -v $mutation_msi -f mutation_msi.svg -c $msi_color - mutation_mcc=$(cat ../build/infection-log.json | jq .stats.mutationCodeCoverage) - mcc_color=$(../.gitlab-ci/build/./badge-color.sh $mutation_mcc) - anybadge -l "Mutation MCC" -v $mutation_mcc -f mutation_mcc.svg -c $mcc_color - mutation_ccmsi=$(cat ../build/infection-log.json | jq .stats.coveredCodeMsi) - ccmsi_color=$(../.gitlab-ci/build/./badge-color.sh $mutation_ccmsi) - anybadge -l "Mutation CCMSI" -v $mutation_ccmsi -f mutation_ccmsi.svg -c $ccmsi_color artifacts: paths: - badges/ when: always expire_in: 4 weeks