Skip to content

Commit 6c61445

Browse files
committed
added testing.
1 parent 2e11e62 commit 6c61445

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

.travis.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
language: php
2+
dist: trusty
3+
sudo: false
4+
5+
php:
6+
- 7.0
7+
- 7.1
8+
- 7.2
9+
- 7.3
10+
11+
env:
12+
global:
13+
- SIMPLETEST_DB=sqlite://tmp/site.sqlite
14+
- SIMPLETEST_BASE_URL="http://127.0.0.1:8080"
15+
matrix:
16+
- RELEASE=stable COMPOSER_CHANNEL=stable
17+
- RELEASE=dev COMPOSER_CHANNEL=stable
18+
- RELEASE=stable COMPOSER_CHANNEL=snapshot
19+
20+
before_install:
21+
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
22+
- phpenv config-rm xdebug.ini
23+
- composer --verbose self-update --$COMPOSER_CHANNEL
24+
- composer --version
25+
26+
install:
27+
- composer --verbose validate
28+
- composer --verbose install
29+
30+
script:
31+
- if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi;
32+
- if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.8.x-dev; composer --verbose require --no-update --dev drupal/core-dev:8.8.x-dev; fi;
33+
- if [[ $RELEASE = dev ]]; then composer --verbose update; fi;
34+
- ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
35+
- ./vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
36+
- until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null
37+
# Run a single unit test to verfiy the testing setup.
38+
- ./vendor/bin/phpunit -c ./web/core ./web/core/modules/system/tests/src/Unit/SystemRequirementsTest.php
39+
- ./vendor/bin/drush
40+
- if [[ $RELEASE = stable ]]; then ./vendor/bin/drupal; fi;

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"cweagans/composer-patches": "^1.6.5",
1717
"drupal-settings/basic": "^1.7",
1818
"drupal/config_split": "^1.4",
19+
"drupal/console": "^1.0.2",
1920
"drupal/core-composer-scaffold": "^8.8.0",
2021
"drupal/core-recommended": "^8.8.0",
2122
"drush/drush": "^9.7.1 || ^10.0.0",

phpunit.xml.dist

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
5+
backupGlobals="false"
6+
colors="true"
7+
bootstrap="vendor/autoload.php"
8+
verbose="true"
9+
>
10+
<testsuites>
11+
<testsuite name="drupal-composer-project tests">
12+
<directory>./test/</directory>
13+
</testsuite>
14+
</testsuites>
15+
</phpunit>

0 commit comments

Comments
 (0)