Skip to content

Commit

Permalink
Add Travis config for various checks
Browse files Browse the repository at this point in the history
This adds continuous-integration configuration for checking PHP
lint, coding standards, and non-executable files.

Refs: #817
  • Loading branch information
samwilson committed Jul 13, 2018
1 parent e8df728 commit 79cda36
Show file tree
Hide file tree
Showing 5 changed files with 454 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .gitignore
Expand Up @@ -16,4 +16,8 @@

# Eclipse
.settings
.project
.project

# Composer
vendor/

21 changes: 21 additions & 0 deletions .phpcs.xml
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<ruleset>

<rule ref="Generic.Arrays.ArrayIndent">
<properties>
<property name="indent" value="2" />
</properties>
</rule>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="2" />
</properties>
</rule>
<rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman" />
<rule ref="Squiz.Strings.ConcatenationSpacing" />

<file>.</file>

<exclude-pattern>./vendor</exclude-pattern>

</ruleset>
16 changes: 16 additions & 0 deletions .travis.yml
@@ -0,0 +1,16 @@
language: php

php:
- '5.6'
- '7.0'
- '7.1'
- '7.2'

install:
- composer install

script:
- composer validate
- vendor/bin/parallel-lint . --exclude vendor/
- vendor/bin/phpcs -p -s
- vendor/bin/minus-x check .
15 changes: 15 additions & 0 deletions composer.json
@@ -0,0 +1,15 @@
{
"name": "piwigo/piwigo",
"description": "A full featured open source photo gallery for the web.",
"license": "GPL-2.0-only",
"require-dev": {
"jakub-onderka/php-parallel-lint": "^1.0",
"squizlabs/php_codesniffer": "^3.0",
"mediawiki/minus-x": "^0.3"
},
"config": {
"platform": {
"php": "5.6"
}
}
}

0 comments on commit 79cda36

Please sign in to comment.