OSDN Git Service

Настройка travis-CI/CD
[invent/invent.git] / .travis.yml
1 language: php
2
3 php:
4     - 7.4
5
6 services:
7     - postgresql
8
9 before_script:
10     # Check sintax errors
11     - '! find . -path ./vendor -prune -o -type f -name "*.php" -exec php -d error_reporting=32767 -l {} \; 2>&1 >&- | grep "^"'
12     # Postgersql
13     - psql -c 'CREATE DATABASE invent;' -U postgres
14     - psql -c "CREATE USER invent WITH PASSWORD 'Rfhkc0y';" -U postgres
15     # Start up a web server
16     - php -S 127.0.0.1:8888 -t web >/dev/null 2>&1 &
17     # Start up the webdriver
18     #- phantomjs --webdriver=4444 >/dev/null 2>&1 &
19     # Install codeception
20     - composer install --prefer-source
21     - echo "yes" | ./yii migrate/up
22     - echo "yes" | ./yii migrate --migrationPath=@yii/rbac/migrations
23     - echo "yes" | ./yii rbac/init
24
25 script:
26     - vendor/bin/codecept run