This repository has been archived by the owner on Nov 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
73 lines (62 loc) · 2.03 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
# Travis CI
# Use new container based environment
sudo: false
# Declare project language.
language: php
env:
global:
# Name and folder of the the standard to test.
- STANDARD="CodeIgniter4"
# Upload covarage to coveralls.
- COVERALLS="1"
# Xdebug3 needs this.
- XDEBUG_MODE=coverage
matrix:
fast_finish: true
# Declare versions of PHP to use. Use one decimal max.
include:
# aliased to a recent 5.4.x version
# - php: '5.4'
# aliased to a recent 5.5.x version
# - php: '5.5'
# aliased to a recent 5.6.x version
# - php: '5.6'
# aliased to a recent 7.x version
# - php: '7.0'
# aliased to a recent 7.x version
# - php: '7.1'
- php: '7.2'
- php: '7.3'
- php: '7.4'
# - php: '8.0'
# aliased to a recent hhvm version
# - php: 'hhvm'
# php nightly
# - php: 'nightly'
# allow_failures:
# - php: 'hhvm'
# - php: 'nightly'
before_install:
# Remove xdebug. Needed for coverage.
# - phpenv config-rm xdebug.ini
install:
# Update composer to latest version.
- composer self-update
# Install project composer deps in composer.json
- composer install --no-interaction
before_script:
# Rehash the php environment if testing on several PHP versions.
# - phpenv rehash
script:
# Check for PHP syntax errors.
- find -L . -path ./vendor -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
# - Check files match the PHPCS standard.
- ./vendor/bin/phpcs --ignore=*/Tests/* ./$STANDARD/ --standard=./vendor/squizlabs/php_codesniffer/phpcs.xml.dist
# Change the default standard.
- ./vendor/bin/phpcs --config-set installed_paths $TRAVIS_BUILD_DIR/$STANDARD
# Verify it's installed.
- ./vendor/bin/phpcs -i
# Run unit tests for the standard.
- ./vendor/bin/phpunit --debug --filter $STANDARD
after_success:
- if [[ "$COVERALLS" == "1" && "$TRAVIS_PHP_VERSION" == "7.4" ]]; then ./vendor/bin/coveralls -v -x ./build/logs/coverage/clover/clover.xml; fi