diff --git a/.gitignore b/.gitignore index 7a0a742..d1502b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ -.* -*.lock -vendor -phpunit.xml +vendor/ +composer.lock diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ad64353 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,31 @@ +language: php + +php: + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - hhvm # ignore errors, see below + +# lock distro so new future defaults will not break the build +dist: trusty + +matrix: + allow_failures: + - php: hhvm + +services: + - mysql + +sudo: false + +install: + - composer install --no-interaction + +before_script: + - mysql -e 'CREATE DATABASE IF NOT EXISTS test;' + +script: + - DB_USER=root DB_PASSWD= ./vendor/bin/phpunit --coverage-text diff --git a/README.md b/README.md index 557835d..51a64c3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # MySQL +[![Build Status](https://travis-ci.org/friends-of-reactphp/mysql.svg?branch=master)](https://travis-ci.org/friends-of-reactphp/mysql) + Async, [Promise](https://github.com/reactphp/promise)-based MySQL database client for [ReactPHP](https://reactphp.org/). @@ -60,6 +62,11 @@ This will install the latest supported version: $ composer require react/mysql:^0.2 ``` +This project aims to run on any platform and thus does not require any PHP +extensions and supports running on legacy PHP 5.4 through current PHP 7+ and +HHVM. +It's *highly recommended to use PHP 7+* for this project. + ## Tests To run the test suite, you first need to clone this repo and then install all