language: php

php:
    - 7.1.18
    - 7.2
    - 7.3

services:
    - mysql

install:
    # Install wireshell
    - composer global require wireshell/wireshell

    # Install ProcessWire
    - cd ../..
    - ~/.config/composer/vendor/bin/wireshell new processwire --profile=blank --dbUser=root --dbPass= --dbName=processwire --timezone=Europe/Berlin --httpHosts=localhost --username=admin --userpass=s3cr3t --useremail=john.doe@foo.com

    # Copy the cloned module to site/modules
    - cd processwire/site/modules
    - cp -r $TRAVIS_BUILD_DIR .

    # Install dependencies
    - cd TemplateEngineTwig
    - composer install

    # Move the TemplateEngineFactory folder to site/modules, since we composer install in the module instead of ProcessWire root
    - mv site/modules/TemplateEngineFactory/ ../


script:
    - vendor/bin/phpunit --bootstrap tests/bootstrap.php tests --colors

language: php

php:
    - 7.2
    - 7.3
    - 7.4

services:
    - mysql

install:
    # Install wireshell
    - composer global require wireshell/wireshell

    # Install ProcessWire
    - cd ../..
    - ~/.config/composer/vendor/bin/wireshell new processwire --profile=blank --dbUser=root --dbPass= --dbName=processwire --timezone=Europe/Berlin --httpHosts=localhost --username=admin --userpass=s3cr3t --useremail=john.doe@foo.com

    # Copy the cloned module to site/modules
    - cd processwire/site/modules
    - cp -r $TRAVIS_BUILD_DIR .

    # Install dependencies
    - cd TemplateEngineTwig
    - composer install

    # Move the TemplateEngineFactory folder to site/modules, since we composer install in the module instead of ProcessWire root
    - mv site/modules/TemplateEngineFactory/ ../


script:
    - vendor/bin/phpunit --bootstrap tests/bootstrap.php tests --colors

Remove tests for php 7.1 and run them with php 7.4
Remove tests for php 7.1 and run them with php 7.4
