.travis.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. language: php
  2. sudo: required
  3. cache:
  4. directories:
  5. - $HOME/.composer/cache/files
  6. services:
  7. - mongodb
  8. - docker
  9. env:
  10. - MONGO_URI="mongodb://127.0.0.1:27017"
  11. MONGO_DBNAME="gridfs_test"
  12. SFTP_HOST=localhost
  13. SFTP_PORT=2222
  14. SFTP_USER=gaufrette
  15. SFTP_PASSWORD=gaufrette
  16. SFTP_BASE_DIR=gaufrette
  17. FTP_HOST=localhost
  18. FTP_PORT=21
  19. FTP_USER=gaufrette
  20. FTP_PASSWORD=gaufrette
  21. FTP_BASE_DIR=/gaufrette/
  22. matrix:
  23. include:
  24. - php: '7.1'
  25. - php: '7.2'
  26. - php: '7.3'
  27. before_install:
  28. - echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
  29. - phpenv config-rm xdebug.ini || echo "xdebug not available"
  30. - docker run -p ${SFTP_PORT}:22 -d atmoz/sftp:alpine ${SFTP_USER}:${SFTP_PASSWORD}:::${SFTP_BASE_DIR}
  31. - docker run -d --name ftpd_server -p ${FTP_PORT}:21 -p 30000-30009:30000-30009 -e "PUBLICHOST=${FTP_HOST}" stilliard/pure-ftpd
  32. - docker exec -it ftpd_server sh -c "(echo ${FTP_PASSWORD}; echo ${FTP_PASSWORD}) | pure-pw useradd ${FTP_USER} -f /etc/pure-ftpd/passwd/pureftpd.passwd -m -u ftpuser -d /home/ftpusers/${FTP_USER}"
  33. install:
  34. - composer update --prefer-dist --no-progress --no-suggest --ansi
  35. script:
  36. - php vendor/bin/phpspec run -fpretty --verbose
  37. - php vendor/bin/phpunit --verbose