-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
147 lines (129 loc) · 4.33 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
sudo: required
dist: trusty
language: php
php:
- 7.1
- 7.3
- nightly
stages:
- composer validate
- test
- coverage
matrix:
fast_finish: true
allow_failures:
- php: nightly
- php: 7.3
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "DVwz7mJZPez3r1wMNfYv2Pj/BkCi6VTXghfasOtXOw95GSIQ9gZErIPmjDpR27fopmpSYen+QyCBHpqA9UdctCX3BGi+g3yb325dTJa/xZt5zCkah/ebhLOCKMwP7SM6n2zrkViaMQjTqQ5fvV60YZJmckzjhxDWmgHDfWE6nZodphmrMrnN5Mi7EMAx5sePd9WB1uqup01N8mCB4vR8n9HYAnIkPB4zt+0xe2jU7xIDzwaeQk9yCTweA4JCOH1sgKBfwFwqvMv/TvZ4BqzTQVAJPJLungmq0EzpXOcDhuPa36pAGGyMS3KQnABDR7V/ZXZhukNEyiGZyqVuF7yOXiOGmbn4WF63dKUIx9VZrIsFgy7ZEFYmcFaoSfYFmO+7iRCniOnqutUQxJ1nr5eisYWkbzmoCttX9jXx1EaFbs2Js0xLYAi3G250nsrGoo1L9Ln3KQo+OvnmsERBGPddfyBdXY8HoOxWd9BVEOlyNYIva4cDOtu16eD7ZSy5+Hwe72HKdckRJ8oxnl/E5H1nHEcuWSj9MyP5cfXiwp6r43KCNxVZ0F7WhI7bv1NJv3oByvZs3146LH4qwv8rJvs7j3kAgeGwrYlGvpuL7lRHQGQJAEWexCcCc6rzqtfi0r5FeV/0qbBXSlH0PCwnH6YcsaLG0WifYka8i56y9bJK6MY="
addons:
apt:
packages:
- apache2
- libapache2-mod-fastcgi
cache:
yarn: true
directories:
- $HOME/.sonar/cache
- $HOME/.composer/cache/files
- $HOME/build/YetiForceCompany/cache
branches:
only:
- developer
- /^greenkeeper/.*$/
services:
- mysql
mysql:
database: yetiforce
username: root
encoding: utf8
before_script:
- export COMMIT_AUTHOR_EMAIL="$(git log -1 $TRAVIS_COMMIT --pretty="%cE")"
- export COMMIT_AUTHOR_NAME="$(git log -1 $TRAVIS_COMMIT --pretty="%aN")"
- sudo lscpu
- sudo lshw
- sudo cat /proc/cpuinfo
- sudo free -m
- sudo cat /proc/meminfo
- sudo chmod -R 777 tests/setup/
- ./tests/setup/before_script.sh
- ./tests/setup/apache.sh
- php -i
script:
- cd tests
- ../vendor/bin/phpunit --verbose --testsuite Init,Base,Integrations,Settings,Apps
- sudo ls -all
- cd ..
- sudo ls -all
after_script:
- sudo cat /var/log/apache2/error.log
- sudo cat /var/log/apache2/access.log
- sudo cat /var/log/apache2/other_vhosts_access.log
- cat ./tests/records.log
- cat ./cache/logs/errors.log
- cat ./cache/logs/request.log
- cat ./cache/logs/phpError.log
- cat ./cache/logs/system.log
- cat ./cache/logs/Importer.log
- cat ./cache/logs/webserviceDebug.log
- cat ./cache/logs/webserviceErrors.log
- sudo ls -all ../screenshots
jobs:
include:
- stage: composer validate
php: 7.3
addons: skip
services: skip
before_script: skip
install: skip
after_script: skip
script: composer validate
- stage: coverage
env: BROWSER_NAME="chrome" CHROME_HEADLESS="1" DEPENDENCIES="--prefer-lowest"
php: 7.2
addons:
apt:
packages:
- apache2
- libapache2-mod-fastcgi
chrome: stable
sonarcloud:
organization: "yetiforcecompany"
token:
secure: ${SONAR_TOKEN}
coverity_scan:
project:
name: "YetiForceCompany/YetiForceCRM"
notification_email: m.krzaczkowski@yetiforce.com
branch_pattern: coverity_scan
before_script:
- if [ "$TRAVIS_SECURE_ENV_VARS" = true ]; then git fetch --unshallow; fi
- sudo chmod -R 777 tests/setup/
- ./tests/setup/before_script.sh
- ./tests/setup/apache.sh
- ./tests/setup/selenium.sh
script:
- cd tests
- ../vendor/bin/phpunit --verbose --log-junit 'tests/execution.xml' --coverage-clover 'tests/coverage.xml'
- sudo ls -all
- cd ..
- if [ "$TRAVIS_SECURE_ENV_VARS" = true ]; then sonar-scanner; fi
- sudo ls -all
after_script:
- sudo cat /var/log/apache2/error.log
- sudo cat /var/log/apache2/access.log
- sudo cat /var/log/apache2/other_vhosts_access.log
- cat ./tests/records.log
- cat ./cache/logs/errors.log
- cat ./cache/logs/request.log
- cat ./cache/logs/phpError.log
- cat ./cache/logs/system.log
- cat ./cache/logs/Importer.log
- cat ./cache/logs/webserviceDebug.log
- cat ./cache/logs/webserviceErrors.log
- php $HOME/build/YetiForceCompany/cache/ocular.phar code-coverage:upload --format=php-clover tests/coverage.xml
- bash <(curl -s https://codecov.io/bash)
- sudo ls -all ../screenshots