Do you wish to register an account?
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
921B

  1. language: php
  2. sudo: false
  3. services:
  4. - mysql
  5. - postgresql
  6. php:
  7. - 7.0
  8. - 7.1
  9. - 7.2
  10. - 7.3
  11. - 7.4
  12. install:
  13. - composer install --dev --no-progress
  14. env:
  15. - DB=mysql
  16. - DB=pgsql
  17. before_script:
  18. - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS todo_test;' -U postgres; fi"
  19. - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database todo_test;' -U postgres; fi"
  20. - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS todo_test;'; fi";
  21. script:
  22. - vendor/bin/phinx migrate -e testing -c tests/phinx/$DB.yml
  23. - mkdir -p build/logs
  24. - cd tests && phpunit --coverage-clover build/logs/clover.xml
  25. after_script:
  26. - wget https://scrutinizer-ci.com/ocular.phar
  27. - php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
  28. matrix:
  29. exclude:
  30. - php: hhvm
  31. env: DB=pgsql
  32. allow_failures:
  33. - php: hhvm
  34. fast_finish: true