Skip to content

Commit

Permalink
Reusing same testin gscripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash committed Feb 7, 2017
1 parent 3052b59 commit 8f45847
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 16 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ install:
script:
- source ${BLT_DIR}/scripts/blt/ci/smoke_tests.sh
- source ${BLT_DIR}/scripts/blt/ci/create_blt_project.sh
# Call targets in the new 'blt-project' project.
- blt ci:build:validate:test -Dcreate_alias=false -Dbehat.run-server=true -Dbehat.launch-phantom=true -Dblt.verbose=true
# Run 'blt-project' tests.
- phpunit ${BLT_DIR}/tests/phpunit --group blt-project
- source ${BLT_DIR}/scripts/travis/run_tests.sh
- source ${BLT_DIR}/scripts/blt/ci/doctor.sh
- phpunit ${BLT_DIR}/tests/phpunit --group blt-project
# Deploy build artifact.
- blt deploy:build
- source ${BLT_DIR}/scripts/blt/ci/test_artifact.sh
Expand Down
1 change: 1 addition & 0 deletions acquia-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ events:
- source ${BLT_DIR}/scripts/pipelines/run_tests
# Make BLT doctor happy.
- source ${BLT_DIR}/scripts/blt/ci/doctor.sh
- phpunit ${BLT_DIR}/tests/phpunit --group blt-project


# Generate artifact.
Expand Down
4 changes: 2 additions & 2 deletions phing/tasks/blt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<exec dir="${repo.root}" command="${composer.bin}/yaml-cli update:value ${blt.config-files.project} project.machine_name '${dirname}'" logoutput="true" checkreturn="false" level="${blt.exec_level}" passthru="true"/>

<echo>Installing new Composer dependencies provided by BLT. This make take a while</echo>
<exec dir="${repo.root}" command="cat ${blt.root}/phing/build.yml" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>
<exec dir="${repo.root}" command="rm -rf ${repo.root}/vendor composer.lock" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>
<!--<exec dir="${repo.root}" command="composer update &#45;&#45;no-interaction" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>-->
<exec dir="${repo.root}" command="rm -rf ${repo.root}/vendor ${repo.root}/composer.lock" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>
<exec dir="${repo.root}" command="composer install --no-interaction --prefer-dist" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>
<copy file="${repo.root}/docroot/profiles/contrib/lightning/lightning.extend.yml" tofile="${repo.root}/docroot/sites/default/lightning.extend.yml"/>

Expand Down
13 changes: 13 additions & 0 deletions scripts/blt/ci/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -ev

${COMPOSER_BIN}/phpunit ${BLT_DIR}/tests/phpunit --group blt-project

# Validate composer.json file.
composer validate --no-check-all --ansi

# The local.hostname must be set to 127.0.0.1:8888 because we are using drush runserver to test the site.
yaml-cli update:value blt/project.yml project.local.hostname '127.0.0.1:8888'

set +v
6 changes: 1 addition & 5 deletions scripts/pipelines/run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ set -ev

export PATH=${COMPOSER_BIN}:${PATH}

# Validate composer.json file.
composer validate --no-check-all --ansi

# The local.hostname must be set to 127.0.0.1:8888 because we are using drush runserver to test the site.
yaml-cli update:value blt/project.yml project.local.hostname '127.0.0.1:8888'
source ${BLT_DIR}/scripts/blt/ci/run_tests.sh
blt -Dbehat.run-server=true -Dcreate_alias=false -Dbehat.launch-selenium=false -Dbehat.launch-phantomjs=true -Dbehat.tags='~experimental' -Dblt.verbose=true ci:build:validate:test

set +v
7 changes: 2 additions & 5 deletions scripts/travis/run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

set -ev

# Validate composer.json file.
composer validate --no-check-all --ansi
source ${BLT_DIR}/scripts/blt/ci/run_tests.sh

# The local.hostname must be set to 127.0.0.1:8888 because we are using drush runserver to run the site on Travis CI.
yaml-cli update:value blt/project.yml project.local.hostname '127.0.0.1:8888'
blt -Dbehat.run-server=true -Dcreate_alias=false -Dbehat.tags='~experimental' -Dblt.verbose=true ci:build:validate:test
blt ci:build:validate:test -Dcreate_alias=false -Dbehat.run-server=true -Dblt.verbose=true

set +v

0 comments on commit 8f45847

Please sign in to comment.