Skip to content

Commit

Permalink
8.4.0 init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
oalahmed committed Jun 23, 2020
0 parents commit 7657426
Show file tree
Hide file tree
Showing 626 changed files with 101,454 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Ignore paths that contain user-generated content.
docroot/*/settings.local.php
docroot/files
docroot/sites/*/files
docroot/sites/*/private
acquia-file
/log
docroot/sites/default/settings.local.php


# Ignore vim swp files and gedit temp files
*.swp
*.*~
.vim

# eclipse settings files
.project
.pydevproject
.settings
.buildpath

# netbeans settings files
nbproject

# Ignore OS settings files
.DS_Store*
Thumbs.db
ehthumbs.db

# Ignore files generated by PhpStorm
.idea

# and some random server stuff
.bash_history
.bashrc
errors.log


/css/variables.css
/themes/vardoc_theme/css/variables.css
/themes/vardoc_theme/css/mixins.css
78 changes: 78 additions & 0 deletions .phpmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0"?>
<ruleset xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PMD Ruleset for Drupal" xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
<description>
A PMD Ruleset for Drupal coding standards.
</description>

<!--
Include each rule explicitly so we know what we have.
@see https://github.com/phpmd/phpmd/blob/master/src/main/resources/rulesets/
-->

<!-- Clean Code -->
<!--
These don't align with Drupal standards, so they are excluded.
@todo Static calls are hard to test and extend, is there a way to whitelist the ones that are OK?
<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag"/>
<rule ref="rulesets/cleancode.xml/ElseExpression"/>
<rule ref="rulesets/cleancode.xml/StaticAccess"/>
-->

<!-- Code Size -->
<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/>
<rule ref="rulesets/codesize.xml/NPathComplexity"/>
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>
<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/>
<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>
<rule ref="rulesets/codesize.xml/ExcessivePublicCount"/>
<rule ref="rulesets/codesize.xml/TooManyFields"/>

<!-- Controversial -->
<rule ref="rulesets/controversial.xml/Superglobals"/>
<!--
These checks do not need to be included since PHPCS will check for style.
<rule ref="rulesets/controversial.xml/CamelCaseClassName"/>
<rule ref="rulesets/controversial.xml/CamelCasePropertyName"/>
<rule ref="rulesets/controversial.xml/CamelCaseMethodName"/>
<rule ref="rulesets/controversial.xml/CamelCaseParameterName"/>
<rule ref="rulesets/controversial.xml/CamelCaseVariableName"/>
-->

<!-- Design -->
<rule ref="rulesets/design.xml/ExitExpression"/>
<rule ref="rulesets/design.xml/EvalExpression"/>
<rule ref="rulesets/design.xml/GotoStatement"/>
<rule ref="rulesets/design.xml/NumberOfChildren"/>
<rule ref="rulesets/design.xml/DepthOfInheritance"/>
<rule ref="rulesets/design.xml/CouplingBetweenObjects"/>
<rule ref="rulesets/design.xml/DevelopmentCodeFragment"/>

<!-- Naming -->
<rule ref="rulesets/naming.xml/ShortVariable">
<properties>
<!-- Allow $id and $op as a variable name. -->
<property name="exceptions" description="Comma-separated list of exceptions" value="id,op"/>
</properties>
</rule>
<rule ref="rulesets/naming.xml/LongVariable">
<properties>
<!-- Bump variable length to a more reasonable number. -->
<property name="maximum" description="The variable length reporting threshold" value="35"/>
</properties>
</rule>
<rule ref="rulesets/naming.xml/ShortMethodName"/>
<rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass"/>
<rule ref="rulesets/naming.xml/ConstantNamingConventions"/>
<rule ref="rulesets/naming.xml/BooleanGetMethodName"/>

<!-- Unused Code -->
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/>
<!-- <rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/> -->
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
<!--
Hooks often have unused parameters, so ignore this warning.
@todo is there a way to allow unused parameters in hooks but not elsewhere?
<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>
-->

</ruleset>
66 changes: 66 additions & 0 deletions .phpqa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# ==============================================================================
# Default common config for Phpqa.
#
# For more options see:
# https://github.com/EdgedesignCZ/phpqa/blob/master/.phpqa.yml
# ==============================================================================

phpqa:
analyzedDirs: ./
buildDir: ./tests/code-quality
ignoredDirs: ".gitlab-ci,.git,.idea,bin,docroot,node_modules,private,.tests/assets,vendor,web"
ignoredFiles: ""
report: true
# verbose: true
# execution: no-parallel
tools:
- phpmetrics
- phploc
- phpcs
- phpmd
- pdepend
- phpcpd
- phpstan
- security-checker
extensions:
- php
- inc
- module
- install
- test
- profile
- theme
- info
- txt
- md

phpcs:
standard: Drupal
ignoreWarnings: true
# https://github.com/squizlabs/PHP_CodeSniffer/wiki/Reporting
reports:
cli:
- full
file:
checkstyle: checkstyle.xml

pdepend:
# coverageReport: build/coverage-clover.xml

phpmd:
standard: ./.phpmd.xml

phpstan:
level: 3
# https://github.com/phpstan/phpstan#configuration
standard: phpstan.neon

phpcpd:
minLines: 5
minTokens: 70

phpmetrics:
config: null
git: false


129 changes: 129 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
dist: trusty

language: php
cache:
bundler: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.drush/cache"
- "$HOME/.npm"
- "$HOME/.selenium/cache"

php:
- 7.3

env:
- AFATG=01-website-base-requirements
- AFATG=02-user-management
- AFATG=03-admin-management
- AFATG=04-content-structure
- AFATG=05-content-management

matrix:
exclude:
# Automated Functional Acceptance Testing group: 01 website base requirements
- php: 7.3
env: AFATG=01-website-base-requirements

# Automated Functional Acceptance Testing group: 02 user management
- php: 7.3
env: AFATG=02-user-management

# Automated Functional Acceptance Testing group: 03 admin management
- php: 7.3
env: AFATG=03-admin-management

# Automated Functional Acceptance Testing group: 04 content structure
- php: 7.3
env: AFATG=04-content-structure

# Automated Functional Acceptance Testing group: 05 content-management
- php: 7.3
env: AFATG=05-content-management

mysql:
database: test_vardoc1c
username: root
encoding: utf8

before_install:
- phpenv config-rm xdebug.ini
- phpenv rehash
- composer self-update
- composer --version

# Composer Configurations.
- export PATH="$HOME/.composer/vendor/bin:$TRAVIS_BUILD_DIR/bin:$PATH"
- export COMPOSER_EXIT_ON_PATCH_FAILURE=1

# MySQL Configurations.
- mysql -e 'SET GLOBAL wait_timeout = 5400;'
- mysql -e "SHOW VARIABLES LIKE 'wait_timeout'"

# PHP Configurations.
- echo 'max_execution_time = 1200' >> varbase.php.ini;
- echo 'max_input_time = 180' >> varbase.php.ini;
- echo 'max_input_vars = 10000' >> varbase.php.ini;
- echo 'memory_limit = 3000M' >> varbase.php.ini;
- echo 'error_reporting = E_ALL' >> varbase.php.ini;
- echo 'post_max_size = 64M' >> varbase.php.ini;
- echo 'upload_max_filesize = 32M' >> varbase.php.ini;
- echo 'max_file_uploads = 40' >> varbase.php.ini;
- echo 'sendmail_path = /bin/true' >> varbase.php.ini;
- phpenv config-add varbase.php.ini
- phpenv rehash

# Configure and run the virtual display.
- export DISPLAY=:99
- sh -e /etc/init.d/xvfb start
- Xvfb :99 -ac -screen 0 1366x768x24 &>/dev/null &
- sleep 3

# Download Latest Chrome Driver.
- CHROME_DRIVER_VERSION=$(wget -qO- chromedriver.storage.googleapis.com/LATEST_RELEASE);
- echo $CHROME_DRIVER_VERSION;
- wget http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip
- unzip chromedriver_linux64.zip
- chmod +x chromedriver
- mkdir -p $HOME/.composer/vendor/bin
- mv -f chromedriver $HOME/.composer/vendor/bin/
- rm chromedriver_linux64.zip

# Update to latest Chrome browser.
- export CHROME_BIN=/usr/bin/google-chrome
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo apt-get clean
- sudo apt-get update
- sudo apt-get install dpkg
- sudo dpkg -i google-chrome-stable_current_amd64.deb
- rm google-chrome-stable_current_amd64.deb
- google-chrome --version

# Run selenium standalone server.
- SELENIUM="$HOME/.selenium/cache/selenium-server-standalone-2.53.1.jar";
- if [[ ! -f $SELENIUM ]]; then wget -O $SELENIUM http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar; fi
- java -jar $SELENIUM -port 4445 > /dev/null 2>&1 &
- echo "[ OK ] Starting Selenium on the 4445 port ..."
install:
- git checkout $TRAVIS_COMMIT
## Build with the composer.
- composer install --no-interaction

## Install with drush.
- cd docroot
- drush site-install vardoc --yes --site-name='Test Vardoc1c' --account-name=webmaster --account-pass=dD.123123ddd [email protected] --db-url="mysql://root:@localhost/test_vardoc1c" vardoc_extra_components.vardoc_demo=true varbase_development_tools.varbase_development=true
- drush config-set system.performance css.preprocess 0 --yes
- drush config-set system.performance js.preprocess 0 --yes
- drush config-set system.logging error_level all --yes
- drush cr
before_script:
- drush runserver --default-server=builtin 8080 &>/dev/null &
- sleep 5
script:
- cd ./profiles/vardoc
- behat --strict tests/features/vardoc/step1-init-tests/
- behat --strict tests/features/vardoc/step2-apply-tests/$AFATG
# - behat --strict tests/features/vardoc/step3-cleanup-tests/ # no need as we build every time.

matrix:
fast_finish: true
Loading

0 comments on commit 7657426

Please sign in to comment.