Commit ad72f041 authored by Ines WALLON's avatar Ines WALLON
Browse files

add contrib_modules

parent df6844e3
Pipeline #566 failed with stage
in 1 minute and 55 seconds
......@@ -6,13 +6,15 @@ services:
variables:
DOCKER_DRIVER: overlay
WEB_CONTAINTER: "docker-compose exec -T web"
test_build:
init_project:
stage: test
image: docker/compose:latest
tags:
- runner-1
- spud
script:
- echo $COMPOSER_AUTH > /usr/local/composer/auth.json
- cp config/.init_files/exemple.docker-compose.yml docker-compose.yml
- cp config/.init_files/exemple.env .env
- sed -i "s/FIXUID=1000/FIXUID=$(id -u)/g" .env
......@@ -20,8 +22,64 @@ test_build:
- mkdir -p web/sites/default/
- cp config/drupal/example.settings.local.php config/drupal/settings.local.php
- cp config/drupal/example.settings.php web/sites/default/settings.php
- docker network create drupalci_nw
- docker-compose up -d
- sleep 30
- docker-compose exec -T web bash /project/scripts/install.sh "skeletond9" "d9@example.com"
- $WEB_CONTAINTER bash /project/scripts/install.sh "skeletond9" "d9@example.com"
rules:
- if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_BRANCH == "contrib_modules"
phpcs:
stage: test
image: docker/compose:latest
tags:
- spud
script:
- $WEB_CONTAINTER bash ./scripts/test-coding-standard.sh
rules:
- if: $CI_COMMIT_BRANCH == "contrib_modules"
phpstan:
stage: test
image: docker/compose:latest
tags:
- spud
script:
- $WEB_CONTAINTER ./vendor/bin/drupal-check web/modules/custom/
rules:
- if: $CI_COMMIT_BRANCH == "contrib_modules"
allow_failure: true
phpunit_cmis:
stage: test
image: docker/compose:latest
tags:
- spud
script:
- docker-compose -f ./web/modules/custom/cmis/tests/docker-compose.yml -d
- export CMIS_URL_NUXEO="http://nuxeo:8080/nuxeo/json/cmis"
- export CMIS_URL_ALFRESCO="http://proxy:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser"
- $WEB_CONTAINTER phpunit --testsuite=cmis
rules:
- if: $CI_COMMIT_BRANCH == "contrib_modules"
phpunit_theme_permission:
stage: test
image: docker/compose:latest
tags:
- spud
script:
- $WEB_CONTAINTER phpunit --testsuite=theme_permission
rules:
- if: $CI_COMMIT_BRANCH == "contrib_modules"
phpunit_paragraphs_usage:
stage: test
image: docker/compose:latest
tags:
- spud
script:
- $WEB_CONTAINTER phpunit --testsuite=paragraphs_usage
rules:
- if: $CI_COMMIT_BRANCH == "contrib_modules"
......@@ -9,12 +9,6 @@
"role": ""
}
],
"repositories": {
"0": {
"type": "composer",
"url": "https://packages.drupal.org/8"
}
},
"require": {
"composer/installers": "^1.2",
"cweagans/composer-patches": "^1.6",
......@@ -36,10 +30,13 @@
"drupal/token": "^1.0",
"drush/drush": "^10.2",
"kint-php/kint": "^3.3",
"webmozart/path-util": "^2.3"
"webmozart/path-util": "^2.3",
"wikimedia/composer-merge-plugin": "dev-feature/composer-v2"
},
"require-dev": {
"drupal/core-dev": "^9"
"drupal/core-dev": "^9",
"mglaman/drupal-check": "^1.1",
"roave/security-advisories": "dev-master"
},
"conflict": {
"drupal/drupal": "*"
......@@ -47,6 +44,14 @@
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"discard-changes": true,
"optimize-autoloader": true,
"platform": {
"php": "7.4"
},
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"scripts": {
......@@ -57,8 +62,7 @@
],
"post-update-cmd": [
"@drupal-scaffold"
],
"sort-packages": true
]
},
"extra": {
"installer-paths": {
......@@ -85,6 +89,27 @@
"[web-root]/sites/default/default.services.yml": false,
"[web-root]/sites/default/development.settings.php": false
}
},
"merge-plugin": {
"include": [
"composer.merge.json",
"www/modules/custom/*/composer.json",
"www/profiles/custom/*/composer.json",
"www/themes/custom/*/composer.json"
],
"merge-extra": true,
"merge-extra-deep": true,
"merge-scripts": true
}
},
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"composer-merge-plugin-composer2": {
"type": "vcs",
"url": "https://github.com/mcaskill/composer-merge-plugin"
}
}
}
This diff is collapsed.
{
"require": {
"drupal/cmis": "3.0.x-dev",
"drupal/paragraphs_usage": "1.0.x-dev",
"drupal/theme_permission": "1.x-dev"
},
"extra": {
"installer-paths": {
"web/modules/custom/cmis": [
"drupal/cmis"
],
"web/modules/custom/paragraphs_usage": [
"drupal/paragraphs_usage"
],
"web/modules/custom/theme_permission": [
"drupal/theme_permission"
]
}
}
}
......@@ -62,3 +62,23 @@ services:
- "traefik.http.routers.${PROJECT_NAME}_mail_secure.rule=Host(`${DRUPAL_MAIL_DEFAULT_DOMAIN_1}`)"
- "traefik.http.routers.${PROJECT_NAME}_mail_secure.middlewares=remove-signature-headers@file"
- "traefik.http.routers.${PROJECT_NAME}_mail_secure.tls=true"
## For development.
# For tests.
chrome:
image: drupalci/webdriver-chromedriver:production
ulimits:
core:
soft: -1
hard: -1
ports:
- 4444:4444
- 9515:9515
entrypoint:
- chromedriver
- "--log-path=/tmp/chromedriver.log"
- "--verbose"
- "--whitelisted-ips="
networks:
default:
external:
name: drupalci_nw
PROJECT_NAME=D9_PROJECT
DRUPAL_SITE_DEFAULT_DOMAIN_1=d9.docker.localhost
DRUPAL_MAIL_DEFAULT_DOMAIN_1=mail.docker.localhost
COMPOSER_AUTH={"github-oauth": {"github.com": "YOUR_GITHUB_TOKEN"}}
FIXUID=1000
FIXGID=1000
......
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="./web/core/tests/bootstrap.php" verbose="true">
<coverage>
<include>
<directory>./web/modules</directory>
</include>
</coverage>
<php>
<env name="SIMPLETEST_DB" value="mysql://drupal:drupal@mariadb/drupal"/>
<env name="SIMPLETEST_BASE_URL" value="http://httpd"/>
<env name="CMIS_URL_NUXEO" value="http://192.168.10.22:8081/nuxeo/json/cmis"/>
<env name="CMIS_URL_ALFRESCO" value="http://192.168.10.22:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser"/>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
verbose="true"
>
<testsuites>
<testsuite name="drupal-composer-project tests">
<directory>./test/</directory>
</testsuite>
</testsuites>
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value="/tmp"/>
<!-- To have browsertest output use an alternative base URL. For example if
SIMPLETEST_BASE_URL is an internal DDEV URL, you can set this to the
external DDev URL so you can follow the links directly.
-->
<env name="BROWSERTEST_OUTPUT_BASE_URL" value="http://httpd"/>
<!-- To disable deprecation testing completely uncomment the next line. -->
<env name="SYMFONY_DEPRECATIONS_HELPER" value="disabled"/>
<!-- Example for changing the driver class for mink tests MINK_DRIVER_CLASS value: 'Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver' -->
<env name="MINK_DRIVER_CLASS" value=''/>
<!-- Example for changing the driver args to mink tests MINK_DRIVER_ARGS value: '["http://127.0.0.1:8510"]' -->
<env name="MINK_DRIVER_ARGS" value=''/>
<!-- Example for changing the driver args to webdriver tests MINK_DRIVER_ARGS_WEBDRIVER value: '["chrome", { "chromeOptions": { "w3c": false } }, "http://localhost:4444/wd/hub"]' For using the Firefox browser, replace "chrome" with "firefox" -->
<env name="MINK_DRIVER_ARGS_WEBDRIVER" value='["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://chrome:9515"]'/>
</php>
<testsuites>
<testsuite name="theme_permission">
<directory>./web/modules/contrib_project/theme_permission/tests/</directory>
</testsuite>
<testsuite name="cmis">
<directory>./web/modules/contrib_project/cmis/tests/</directory>
</testsuite>
<testsuite name="paragraphs_usage">
<directory>./web/modules/custom/paragraphs_usage/tests/</directory>
</testsuite>
</testsuites>
<!-- Filter for coverage reports. -->
</phpunit>
......@@ -16,14 +16,7 @@ drupal-check $CHECK_DIR
echo -e "${YELLOW}[notice] Run phpcs${NC}"
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md $CHECK_DIR
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md $CHECK_DIR
if [ $? -eq 0 ]; then
echo -e "\n${GREEN} [OK] No errors${NC}\n"
fi
echo -e "${YELLOW}[notice] Run PHPUnit${NC}"
if [ -f "$WORK_DIR/phpunit.xml" ]; then
$WORK_DIR/vendor/bin/phpunit $CHECK_DIR
else
echo -e "\n${RED}[error] phpunit.xml not found${NC}"
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment