forked from simPod/PHP-SNMP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (30 loc) · 873 Bytes
/
.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
dist: trusty
language: php
sudo: required
php:
- 7.2
- 7.3
- nightly
before_install:
- echo "extension = snmp.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- composer self-update
before_script:
- travis_retry composer update --prefer-dist
script: ./vendor/bin/phpunit
jobs:
include:
- stage: Coding Standard
php: 7.2
script: ./vendor/bin/phpcs
- stage: Static Analysis
php: 7.2
script:
- ./vendor/bin/phpstan analyse -c phpstan.neon.dist -l max src
cache:
directories:
- $HOME/.composer/cache
after_script:
# upload clover.xml file to Scrutinizer to analyze it
- |
if [ "$TRAVIS_PHP_VERSION" == "7.2" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
if [ "$TRAVIS_PHP_VERSION" == "7.2" ]; then php ocular.phar code-coverage:upload --format=php-clover temp/clover.xml; fi