forked from sumocoders/forkcms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
65 lines (58 loc) · 2.41 KB
/
Copy path.travis.yml
File metadata and controls
65 lines (58 loc) · 2.41 KB
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
language: php
dist: xenial
services:
- mysql
cache:
directories:
- $HOME/.composer/cache/files
sudo: false
before_script:
- composer install
- mysql -e 'create database fork_test'
- mysql -u root fork_test < tests/data/test_db.sql
- cp app/config/parameters.yml.travis app/config/parameters.yml
- mysql -e "SET GLOBAL wait_timeout = 3600" # try to avoid mysql has gone away errors
after_script:
- yarn test
after_failure:
- cat var/logs/test.log
jobs:
include:
- stage: code quality
php: 7.1
name: PHP Static Analysis Tool
before_script:
- mysql -e 'create database fork'
- mysql -u root fork < tests/data/test_db.sql
- cp app/config/parameters.yml.travis app/config/parameters.yml
- mysql -e "SET GLOBAL wait_timeout = 3600" # try to avoid mysql has gone away errors
- composer install
script: bin/phpstan analyze src
after_success: skip
- stage: code quality
php: 7.1
name: PHP Code Sniffer
before_script: composer install
script: bin/phpcs --standard=psr2 --extensions=php --warning-severity=0 --ignore=src/Backend/Core/Js/ckfinder,src/Backend/Cache,src/Frontend/Cache,src/Backend/Core/Js/ckeditor --report=full "src"
after_success: skip
- stage: test
name: Functional
php: 7.1
script:
- travis_wait 30 bin/simple-phpunit --testsuite=functional --coverage-clover=functional.clover
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover functional.clover
- stage: test
name: Unit
php: 7.1
script:
- travis_wait 30 bin/simple-phpunit --testsuite=unit --coverage-clover=unit.clover
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover unit.clover
- stage: test
name: Installer
php: 7.1
script:
- travis_wait 30 bin/simple-phpunit --testsuite=installer --coverage-clover=installer.clover
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover installer.clover