forked from eclipxe13/CfdiUtils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (49 loc) · 1.73 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
language: php
dist: xenial
# php compatibility
php: ["7.0", "7.1", "7.2", "7.3", "7.4"]
branches:
except:
- appveyor
before_install:
- nvm install 8
addons:
apt:
packages:
- libsaxonb-java
env:
global:
- FULL_BUILD_PHP_VERSION="7.4"
- XDEBUG_MODE=coverage
- COVERAGE_FILE=build/coverage-clover.xml
before_script:
- phpenv config-rm xdebug.ini || true
- travis_retry composer install --no-interaction --prefer-dist
- travis_retry npm install
- travis_retry pip install --user mkdocs
- travis_retry bash tests/resource-sat-xml-download build/
script:
- vendor/bin/phpcs -sp src/ tests/
- vendor/bin/php-cs-fixer fix --using-cache=no --dry-run --verbose
- | # create code coverage file
if [[ $TRAVIS_PHP_VERSION == $FULL_BUILD_PHP_VERSION ]]; then
php -dzend_extension=xdebug.so vendor/bin/phpunit --testdox --verbose --coverage-clover="$COVERAGE_FILE"
else
vendor/bin/phpunit --testdox --verbose
fi
- | # only check phpstan on FULL_BUILD_PHP_VERSION
if [[ $TRAVIS_PHP_VERSION == $FULL_BUILD_PHP_VERSION ]]; then
vendor/bin/phpstan --no-progress analyse --level max src/ tests/
fi
- node node_modules/markdownlint-cli/markdownlint.js *.md docs/
- ~/.local/bin/mkdocs build --strict --site-dir build/docs
after_script:
- | # upload test covegare to scrutinizer
if [[ -e "$COVERAGE_FILE" ]]; then
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover "$COVERAGE_FILE"
echo "Scrutinizer code coverage upload status: $?"
fi
notifications:
email:
if: branch = master