forked from phalcon/phalcon-devtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
87 lines (76 loc) · 2.23 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
language: php
services:
- postgresql
- mysql
matrix:
include:
- php: 7.2
env:
- BUILD_PHAR=1
- php: 7.3
env:
- BUILD_PHAR=0
git:
depth: 1
cache:
ccache: true
timeout: 604800
directories:
- .temp
- vendor
- $HOME/.ccache
- $HOME/.composer/cache
- $HOME/cphalcon/$PHALCON_VERSION
- $HOME/ext/$PHALCON_VERSION
env:
global:
- BUILD_PHAR=1
- PATH="$PATH:~/bin"
- DISPLAY=":99.0"
- PHAR_PHP_VERSION=7.2.23
- BOX_VERSION=3.8.3
- PHALCON_VERSION=v4.0.0
before_install:
- if [ -n "$GITHUB_TOKEN" ]; then composer config github-oauth.github.com $GITHUB_TOKEN; fi;
- bash tests/_ci/setup_dbs.sh
install:
- pecl install --force psr
- .ci/install-phalcon.sh
- |
if [ "$BUILD_PHAR" -eq 1 ]
then
echo "Build Phalcon DevTools PHAR"
composer config platform.php $PHAR_PHP_VERSION
.ci/install-box.sh
.ci/build-phar.sh
fi
before_script:
- travis_retry composer install --no-interaction --no-ansi --no-progress --no-suggest
- composer require --dev phpstan/phpstan
- ln -s $PWD/phalcon ~/bin/phalcon
- .ci/serve-webtools.sh
- sed -i "s/getenv('POSTGRES_DB_PORT')/5432/g" tests/_data/acceptance/pgsql/config.php
- cp tests/.env.test .env
script:
- mkdir .phalcon
- vendor/bin/phpcs
- vendor/bin/codecept build
- vendor/bin/codecept run --ext DotReporter acceptance -g mysql --env mysql
- vendor/bin/codecept run --ext DotReporter acceptance -g pgsql --env pgsql
- vendor/bin/codecept run --ext DotReporter acceptance -g common --coverage-xml=coverage-common-$PHAR_PHP_VERSION.xml
- vendor/bin/codecept run --ext DotReporter unit --coverage-xml=coverage-unit-$PHAR_PHP_VERSION.xml
- vendor/bin/codecept run --ext DotReporter functional --coverage-xml=coverage-functional-$PHAR_PHP_VERSION.xml
- vendor/bin/codecept run --ext DotReporter console --coverage-xml=coverage-console-$PHAR_PHP_VERSION.xml
- vendor/bin/psalm --show-info=false
- vendor/bin/phpstan analyse -l 5 -c phpstan.neon src -v
after_success:
- bash <(curl -s https://codecov.io/bash)
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file: phalcon.phar
skip_cleanup: true
on:
php: '7.2'
tags: true
repo: phalcon/phalcon-devtools