-
Notifications
You must be signed in to change notification settings - Fork 197
/
Copy path.travis.yml
29 lines (24 loc) · 1.17 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
sudo: required
services:
- docker
language: php
php:
- 7.3
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
- composer self-update
- mkdir -p "/tmp/PHPloyTestWorkspace/sftp_share/share"
- mkdir -p "/tmp/PHPloyTestWorkspace/ftp_share/share"
- sudo chmod -R 777 "/tmp/PHPloyTestWorkspace/ftp_share"
- chmod +x tests/docker_image_setup.sh && ./tests/docker_image_setup.sh
- docker run --name sftp_testserver -d -v /tmp/PHPloyTestWorkspace/sftp_share:/home/sftpuser -p 2222:22 atmoz/sftp sftpuser:password:$(id -u)
- docker run --name ftp_testserver -d -v /tmp/PHPloyTestWorkspace/ftp_share:/home/ftpusers/ftpuser -v $TRAVIS_BUILD_DIR/tests/ftp_setup.sh:/root/ftp_setup.sh -p 21:21 -p 30000-30009:30000-30009 -e "PUBLICHOST=localhost" stilliard/pure-ftpd:hardened /root/ftp_setup.sh
install:
- travis_retry composer install --no-interaction --prefer-source
script:
- shellcheck tests/*.sh
- ./vendor/bin/phpunit tests
- php -d phar.readonly=0 build