Skip to content

Commit e8067cb

Browse files
committed
Project setup
1 parent 64bfdfc commit e8067cb

File tree

7 files changed

+78
-0
lines changed

7 files changed

+78
-0
lines changed

.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.gitattributes export-ignore
2+
.gitignore export-ignore
3+
/phpunit.xml export-ignore
4+
/tests export-ignore
5+
/.travis.yml export-ignore

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/composer.lock
2+
/phpunit.xml
3+
/vendor

.travis.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
language: php
2+
3+
php:
4+
- 5.4
5+
- 5.5
6+
- 5.6
7+
- 7.0
8+
- hhvm
9+
10+
sudo: false
11+
12+
env:
13+
- COMPOSER_OPTS=""
14+
- COMPOSER_OPTS="--prefer-lowest"
15+
16+
install:
17+
- composer self-update
18+
- composer update $COMPOSER_OPTS
19+
20+
script:
21+
- phpunit
22+
- ./tests/lint.sh
23+
24+
git:
25+
depth: 5

composer.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "duncan3dc/speaker",
3+
"type": "library",
4+
"description": "Convert text to speech using web services",
5+
"keywords": ["text-to-speech", "tts", "speech"],
6+
"homepage": "https://github.com/duncan3dc/speaker",
7+
"license": "Apache-2.0",
8+
"authors": [{
9+
"name": "Craig Duncan",
10+
"email": "[email protected]",
11+
"homepage": "https://github.com/duncan3dc",
12+
"role": "Developer"
13+
}],
14+
"require": {
15+
"php": ">=5.4.0"
16+
},
17+
"autoload": {
18+
"psr-4": {
19+
"duncan3dc\\Speaker\\": "src/",
20+
"duncan3dc\\Speaker\\Test\\": "tests/"
21+
}
22+
}
23+
}

phpunit.xml.dist

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<phpunit bootstrap="tests/bootstrap.php">
2+
<testsuite>
3+
<directory suffix="Test.php">tests</directory>
4+
</testsuite>
5+
</phpunit>

tests/bootstrap.php

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
require __DIR__ . "/../vendor/autoload.php";

tests/lint.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
status=0
4+
5+
cd $(dirname $0)/..
6+
files=$(find src -name "*.php")
7+
for file in $files; do
8+
php -l $file
9+
if [[ $? > 0 ]]; then
10+
status=255
11+
fi
12+
done
13+
14+
exit $status

0 commit comments

Comments
 (0)