Skip to content

Commit

Permalink
[Travis-CI] Fix testing dependencies
Browse files Browse the repository at this point in the history
split: 8f373d1fd6c90bbcf99e4ecdbff3258f3c15151e
  • Loading branch information
kylekatarnls committed Oct 6, 2019
1 parent a9b7f0a commit 1f97360
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 917 deletions.
3 changes: 3 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
disabled:
- phpdoc_var_without_name
- simplified_null_return
30 changes: 19 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,33 @@ git:

matrix:
include:
- php: 5.5
dist: precise
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4snapshot
- php: 7.3
env: COVERAGE=on
dist: trusty
- php: 7.3
env: STYLECHECK=on

install:
- travis_retry composer self-update
- travis_retry composer install
- composer self-update
- if [[ "$STYLECHECK" != "on" ]]; then composer require phpunit/phpunit:^7 phug/split --no-update; fi;
- if [[ "$STYLECHECK" = "on" ]]; then composer require squizlabs/php_codesniffer --no-update; fi;
- composer install
- |
if [[ "$STYLECHECK" != "on" ]]; then
mkdir -p tests/Phug && \
vendor/bin/split copy https://github.com/phug-php/phug.git tests/Phug/ --filters=tests/Phug/ReaderTest.php;
vendor/bin/split copy https://github.com/phug-php/phug.git tests/ --filters=tests/utf8bom.pug;
fi;
script:
- vendor/bin/phug-dev check --report --coverage-php-version=5.6
- if [[ "$STYLECHECK" != "on" && "$COVERAGE" != "on" ]]; then vendor/bin/phpunit; fi;
- if [[ "$COVERAGE" = "on" ]]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml; fi;
- if [[ "$STYLECHECK" = "on" ]]; then vendor/bin/phpcs; fi;

notifications:
slack: phug:nzXFnxhU14RWK2EQSDL0u08z

addons:
code_climate:
repo_token: 394a4fc15473b47102c62fdda8fb12179fc89321742e2527b22f432d76e7355f
repo_token: 4c27d7efe84c820a751151e32eb3850b5238eadf335953720f2e1da7a5633144
File renamed without changes.
File renamed without changes.
9 changes: 3 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@
"require": {
"php": ">=5.5.0",
"symfony/polyfill-mbstring": "*",
"psr/http-message": "^1.0"
},
"require-dev": {
"phug/dev-tool": "^0.1.0",
"phug/util": "^0.3.5"
"psr/http-message": "^1.0",
"phug/util": "^0.3.5 || ^1.0"
},
"autoload": {
"psr-4": {
"": "./src"
"Phug\\": ""
}
},
"bin": [],
Expand Down
9 changes: 9 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<ruleset name="PSR-2">
<rule ref="PSR2">
<include-pattern>*.php</include-pattern>
</rule>
<file>.</file>
<exclude-pattern>/tests/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
</ruleset>
21 changes: 21 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
bootstrap="vendor/autoload.php"
forceCoversAnnotation="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
verbose="true">
<testsuites>
<testsuite name="Phug">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>
Loading

0 comments on commit 1f97360

Please sign in to comment.