I would like to set up a testing scenario where, I can separate the test-builds for phpunit and laravel dusk. The reason why is, tahat this I would like to run different .env & phpunit.xml files for each test-approach.
- Set the environment for PHPUnit
- Test PHPUnit
- Clean the Travis Build
- Set the environment for Laravel Dusk
- Test Laravel Dusk
I've went through the Travis documentation about jobs and the matrix but I cant find a proper approach which I can follow.
my .travis.yml
sudo: true
dist: trusty
language: php
php:
- 7.3
addons:
chrome: stable
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
services:
- mysql
install:
- composer self-update
- travis_retry composer install --no-interaction --prefer-dist --no-suggest
before_script:
- rm composer.lock
- echo -e "[server]\nmax_allowed_packet=64M" | sudo tee -a /etc/mysql/conf.d/drupal.cnf
- sudo service mysql restart
- mysql -e 'CREATE DATABASE testing;'
- mysql -e 'CREATE DATABASE business_external;'
- mysql business_external < /home/travis/build/StanBarrows/business/database/data/business_external
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
- cp .env.travis .env
- cp phpunit.travis.xml phpunit.xml
- php artisan key:generate
- php artisan storage:link
- php artisan serve &
script:
- vendor/bin/phpunit
- php artisan dusk
notifications:
email: false
Aucun commentaire:
Enregistrer un commentaire