diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..bb742bd --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,55 @@ +version: 2 +jobs: + test-php73: + docker: + - image: circleci/php:7.3-cli + - image: postgres:alpine + environment: + POSTGRES_PASSWORD: root + POSTGRES_USER: root + POSTGRES_DB: test + - image: mysql:5 + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: test + + working_directory: ~/project + steps: + - checkout + + - run: + name: Run tests + command: | + composer update -n --prefer-dist --prefer-lowest --no-suggest + php vendor/bin/phpunit + + test-php74: + docker: + - image: circleci/php:7.4-cli + - image: postgres:alpine + environment: + POSTGRES_PASSWORD: root + POSTGRES_USER: root + POSTGRES_DB: test + - image: mysql:5 + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: test + + working_directory: ~/project + steps: + - checkout + + - run: + name: Run tests + command: | + composer update -n --prefer-dist --no-suggest + php vendor/bin/phpunit + + +workflows: + version: 2 + test: + jobs: + - test-php73 + - test-php74 \ No newline at end of file diff --git a/composer.json b/composer.json index 930b80c..904f381 100644 --- a/composer.json +++ b/composer.json @@ -11,14 +11,15 @@ ], "require": { "php": "^7.3", - "doctrine/dbal": "*", - "react/event-loop": "*" + "doctrine/dbal": "^2.5", + "react/event-loop": "^1" }, "require-dev": { + "phpunit/phpunit": "7.5.17", "clue/block-react": "*", - "react/mysql": "*", - "clue/reactphp-sqlite": "*", - "voryx/pgasync": "*" + "react/mysql": "^0.5", + "clue/reactphp-sqlite": "^1", + "voryx/pgasync": "^2" }, "suggest": { "react/mysql": "MySQL usage",