forked from ploi/ploi-php-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (39 loc) · 1.34 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
# Config file for https://travis-ci.org/
# Validate this file here - http://lint.travis-ci.org/
language: php
# Define the php versions against we want to test our code
php:
- 7.3
- 7.4
- 8.0
# Note: Code coverage requires php-xDebug extension enabled on CI server
install:
# Install composer packages
- travis_retry composer install --no-interaction --no-suggest
# Install coveralls.phar
- wget -c -nc --retry-connrefused --tries=0 https://github.com/php-coveralls/php-coveralls/releases/download/v2.0.0/php-coveralls.phar -O coveralls.phar
- chmod +x coveralls.phar
- php coveralls.phar --version
# Create a storage folder for coverage report
before_script:
- mkdir -p build/logs
- cp tests/.env.sample tests/.env
# Testing the app (see phpunit.xml) for configs, generating Code Coverage report
script:
- ./vendor/bin/phpcs --standard=PSR2 src
- ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml
#after_script:
after_success:
# Submit coverage report to Coveralls servers, see .coveralls.yml
- travis_retry php coveralls.phar -v
# Submit coverage report to codecov.io
- bash <(curl -s https://codecov.io/bash)
#after_failure:
# Tell Travis CI to monitor only 'master' branch
branches:
only: master
# You can delete the cache using travis-ci web interface
cache:
directories:
- vendor
- $HOME/.cache/composer