.travis.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. sudo: required
  2. dist: trusty
  3. group: edge
  4. addons:
  5. apt:
  6. packages:
  7. - mysql-server-5.6
  8. - mysql-client-core-5.6
  9. - mysql-client-5.6
  10. - postfix
  11. firefox: "46.0"
  12. hosts:
  13. - magento2.travis
  14. services:
  15. - rabbitmq
  16. - elasticsearch
  17. language: php
  18. php:
  19. - 7.1
  20. - 7.2
  21. env:
  22. global:
  23. - COMPOSER_BIN_DIR=~/bin
  24. - INTEGRATION_SETS=3
  25. - NODE_JS_VERSION=8
  26. - MAGENTO_HOST_NAME="magento2.travis"
  27. matrix:
  28. - TEST_SUITE=unit
  29. - TEST_SUITE=static
  30. - TEST_SUITE=js GRUNT_COMMAND=spec
  31. - TEST_SUITE=js GRUNT_COMMAND=static
  32. - TEST_SUITE=integration INTEGRATION_INDEX=1
  33. - TEST_SUITE=integration INTEGRATION_INDEX=2
  34. - TEST_SUITE=integration INTEGRATION_INDEX=3
  35. - TEST_SUITE=functional
  36. - TEST_SUITE=graphql-api-functional
  37. matrix:
  38. exclude:
  39. - php: 7.1
  40. env: TEST_SUITE=static
  41. - php: 7.1
  42. env: TEST_SUITE=js GRUNT_COMMAND=spec
  43. - php: 7.1
  44. env: TEST_SUITE=js GRUNT_COMMAND=static
  45. - php: 7.1
  46. env: TEST_SUITE=functional
  47. - php: 7.1
  48. env: TEST_SUITE=graphql-api-functional
  49. cache:
  50. apt: true
  51. directories:
  52. - $HOME/.composer/cache
  53. - $HOME/.nvm
  54. - $HOME/node_modules
  55. - $HOME/yarn.lock
  56. before_install:
  57. - ./dev/travis/before_install.sh
  58. install: composer install --no-interaction
  59. before_script: ./dev/travis/before_script.sh
  60. script:
  61. # Set arguments for variants of phpunit based tests; '|| true' prevents failing script when leading test fails
  62. - test $TEST_SUITE = "functional" && TEST_FILTER='dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php' || true
  63. # The scripts for grunt/phpunit type tests
  64. - if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
  65. - if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ] && [ $TEST_SUITE != "graphql-api-functional" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
  66. - if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi
  67. - if [ $TEST_SUITE == "graphql-api-functional" ]; then phpunit -c dev/tests/api-functional; fi