Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Travis ci #1345

Merged
merged 8 commits into from
Jan 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ config.yml
.idea/
*.swp
packaged/
wpcs/
wpcs/
vendor/
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
language: php

matrix:
include:
- name: "PHP 5.6 Compatibility Test"
php: "5.6"
env: TEST_VERSION=5.6
- name: "PHP7.0 Compatibility Test"
php: "7.0"
env: TEST_VERSION=7.0
- name: "PHP 7.1 Compatibility Test"
php: "7.1"
env: TEST_VERSION=7.1
- name: "PHP 7.2 Compatibility Test"
php: "7.2"
env: TEST_VERSION=7.2
- name: "PHP 7.3 Compatibility Test"
php: "7.3"
env: TEST_VERSION=7.3
allow_failures:
- name: "PHP 5.3 Compatibility Test"
php: "5.3"
env: TEST_VERSION=5.3
- name: "PHP 5.4 Compatibility Test"
php: "5.4"
env: TEST_VERSION=5.4
- name: "PHP 5.5 Compatibility Test"
php: "5.5"
env: TEST_VERSION=5.5

before_script:
- composer install --dev
script:
- vendor/bin/phpcs -p src/ --standard=PHPCompatibility --runtime-set testVersion $TEST_VERSION
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@
],
"require": {
"composer/installers": "~1.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "*",
"wimg/php-compatibility": "*",
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4"
}
}
232 changes: 218 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion library/enqueue-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function foundationpress_asset_path( $filename ) {
if ( file_exists( $manifest_path ) ) {
$manifest = json_decode( file_get_contents( $manifest_path ), true );
} else {
$manifest = [];
$manifest = array();
}

if ( array_key_exists( $filename, $manifest ) ) {
Expand Down
16 changes: 16 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<phpunit
bootstrap="tests/bootstrap.php"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
>
<testsuites>
<testsuite>
<directory prefix="test-" suffix=".php">./tests/</directory>
<exclude>./tests/test-sample.php</exclude>
</testsuite>
</testsuites>
</phpunit>