-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
57 lines (49 loc) · 1.43 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
language: php
php:
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
# faster builds on new travis setup not using sudo
sudo: false
# cache vendor dirs
cache:
directories:
- $HOME/.composer/cache
services:
- mysql
env:
global:
- DB_DSN="mysql:host=localhost;dbname=yii2_basic_tests"
- DB_TEST_DSN="mysql:host=localhost;dbname=yii2_basic_tests"
- DB_USER=root
- DB_PASS=
before_install:
- mysql -e 'CREATE DATABASE IF NOT EXISTS yii2_basic_tests;'
- nvm install node
install:
- travis_retry composer self-update && composer --version
- travis_retry composer update --dev --prefer-dist --no-interaction
# install php extensions
- |
if (php --version | grep -i HipHop > /dev/null); then
echo "Skipping imagick and gmagick tests on HHVM"
elif (php --version | grep -i 8.0 > /dev/null); then
echo "Skipping imagick and gmagick tests on php 8.0"
else
pear config-set preferred_state beta
printf "\n" | pecl install imagick
# gmagick is not installed on travis currently
#printf "\n" | pecl install gmagick
fi
# setup application:
- |
sed -i "s/'cookieValidationKey' => ''/'cookieValidationKey' => 'testkey'/" config/web.php
script:
- php tests/bin/yii migrate --interactive=0
- |
php -S localhost:8080 -t web-test > /dev/null 2>&1 &
vendor/bin/codecept run
- curl http://localhost:8080/api/articles
- APIURL="http://localhost:8080/api" sh run-api-tests.sh