Travis 4.1

This commit is contained in:
Steve Boyd 2020-06-23 13:30:13 +12:00
parent 5920058287
commit b4d344fe0e
1 changed files with 33 additions and 11 deletions

View File

@ -1,27 +1,42 @@
language: php
dist: trusty
dist: xenial
services:
- mysql
- postgresql
- xvfb
cache:
directories:
- $HOME/.composer/cache/files
addons:
firefox: "31.0"
apt:
packages:
- tidy
- chromium-chromedriver
- chromium-browser
env:
global:
- COMPOSER_ROOT_VERSION=4.1.x-dev
- DISPLAY=":99"
- XVFBARGS=":99 -ac -screen 0 1024x768x16"
- SS_BASE_URL="http://localhost:8080/"
- SS_ENVIRONMENT_TYPE="dev"
matrix:
include:
- php: 5.6
env: DB=MYSQL RECIPE_VERSION=4.2.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1
- php: 7.0
env: DB=PGSQL RECIPE_VERSION=4.2.x-dev PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL RECIPE_VERSION=4.2.x-dev PHPUNIT_COVERAGE_TEST=1
- php: 7.1
env: DB=MYSQL RECIPE_VERSION=4.2.x-dev BEHAT_TEST=1
env: DB=MYSQL RECIPE_VERSION=4.5.x-dev PHPUNIT_TEST=1 PHPCS_TEST=1 PDO=1
- php: 7.2
env: DB=PGSQL RECIPE_VERSION=4.6.x-dev PHPUNIT_COVERAGE_TEST=1
- php: 7.3
env: DB=MYSQL RECIPE_VERSION=4.6.x-dev BEHAT_TEST=1
- php: 7.3
env: DB=MYSQL RECIPE_VERSION=4.6.x-dev PHPUNIT_TEST=1
- php: 7.4
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1
before_script:
@ -32,10 +47,17 @@ before_script:
# Install composer dependencies
- composer validate
- composer require --no-update silverstripe/recipe-cms:"$RECIPE_VERSION"
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.1.x-dev; fi
- composer require --no-update silverstripe/recipe-cms:$RECIPE_VERSION
# Fix for running phpunit 5 on php 7.4+
- composer require --no-update sminnee/phpunit-mock-objects:^3
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:^2; fi
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
# Remove preinstalled Chrome (google-chrome)
# this would conflict with our chromium-browser installation
# and its version is incompatible with chromium-chromedriver
- sudo apt-get remove -y --purge google-chrome-stable || true
# Start behat services
- if [[ $BEHAT_TEST ]]; then echo 'SS_BASE_URL=http://localhost:8080/' >> .env; fi
- if [[ $BEHAT_TEST ]]; then mkdir artifacts; fi