diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 106e3b8..72d2a0c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ on: - cron: '0 6 * * *' env: - DRUPAL_TESTING_TEST_CODING_STYLES: false + DRUPAL_TESTING_TEST_CODING_STYLES: true DRUPAL_TESTING_PROJECT_BASEDIR: ${{ github.workspace }}/tests/module DRUPAL_TESTING_DATABASE_USER: root DRUPAL_TESTING_DATABASE_PASSWORD: root @@ -61,7 +61,9 @@ jobs: echo "::add-path::$GITHUB_WORKSPACE/bin" - name: Run tests - run: test-drupal-project + run: | + composer install + test-drupal-project --verbose env: DRUPAL_TESTING_COMPOSER_PROJECT: ${{ matrix.DRUPAL_TESTING_COMPOSER_PROJECT }} DRUPAL_TESTING_DRUPAL_VERSION: ${{ matrix.DRUPAL_TESTING_DRUPAL_VERSION }} @@ -104,7 +106,9 @@ jobs: echo "::add-path::$GITHUB_WORKSPACE/bin" - name: Install project - run: test-drupal-project install + run: | + composer install + test-drupal-project install --verbose - name: Zip build run: cd /tmp; tar cfz build.tgz test; mv build.tgz ${GITHUB_WORKSPACE} @@ -148,4 +152,4 @@ jobs: run: tar xCfz /tmp build/build.tgz test; rm -rf build - name: Run the tests - run: test-drupal-project run_tests + run: test-drupal-project run_tests --verbose diff --git a/.travis.yml b/.travis.yml index b25eec4..037da1f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,26 +19,16 @@ branches: - master env: - matrix: - - DRUPAL_TESTING_PROJECT_BASEDIR=${TRAVIS_BUILD_DIR}/vendor/drupal/paragraphs_features - - DRUPAL_TESTING_PROJECT_BASEDIR=${TRAVIS_BUILD_DIR}/vendor/drupal/scheduler_content_moderation_integration DRUPAL_TESTING_TEST_JAVASCRIPT=false global: + - DRUPAL_TESTING_PROJECT_BASEDIR=${TRAVIS_BUILD_DIR}/tests/module - PATH="$TRAVIS_BUILD_DIR/bin:$TRAVIS_BUILD_DIR/vendor/bin:$PATH" - DRUPAL_TESTING_PHPCS_IGNORE_PATTERN="*.md" -before_install: - - composer config repositories.drupal composer https://packages.drupal.org/8 - - composer config repositories.assets composer https://asset-packagist.org - - composer config repositories.paragraph_features git https://github.com/thunder/paragraphs_features.git - - composer config repositories.scheduler_content_moderation_integration git https://github.com/thunder/scheduler_content_moderation_integration.git - - composer require drupal/paragraphs_features:dev-8.x-1.x --no-update - - composer require drupal/scheduler_content_moderation_integration:dev-8.x-1.x --no-update - install: - composer install script: - - test-drupal-project + - test-drupal-project --verbose notifications: email: false diff --git a/bin/test-drupal-project b/bin/test-drupal-project index 42be3a6..8f5494d 100755 --- a/bin/test-drupal-project +++ b/bin/test-drupal-project @@ -25,6 +25,7 @@ Options: -h, --help Display this help. -nc, --no-cleanup Do not cleanup after successful tests. Set this option to keep the installation. -co, --clean-only Just run cleanup and exit. + -v, --verbose Verbose output Example: test-drupal-module Run everything. @@ -62,7 +63,7 @@ for i in "${@}"; do -nc | --no-cleanup) DRUPAL_TESTING_CLEANUP=false ;; - -v) + -v | --verbose) export DRUPAL_TESTING_VERBOSE=true set -o xtrace ;; diff --git a/composer.json b/composer.json index 05f30ff..fa2f0a1 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,7 @@ ], "require": { "php": ">=7.2", - "drupal/coder": "^8.2.0", - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4", + "drupal/coder": "^8.3", "symfony/yaml": "^3.4" } } diff --git a/lib/stages/coding_style.sh b/lib/stages/coding_style.sh index 3b98bc3..b29c73b 100644 --- a/lib/stages/coding_style.sh +++ b/lib/stages/coding_style.sh @@ -18,6 +18,7 @@ _stage_coding_style() { __test_php_coding_styles() { printf "Checking php coding styles\n\n" + phpcs --config-set installed_paths ../../drupal/coder/coder_sniffer phpcs -ps --standard=Drupal --extensions=php,module,inc,install,test,profile,theme --ignore="${DRUPAL_TESTING_PHPCS_IGNORE_PATTERN}" . phpcs -ps --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme --ignore="${DRUPAL_TESTING_PHPCS_IGNORE_PATTERN}" . }