Skip to content

Development

Nurguly Ashyrov edited this page Nov 11, 2018 · 4 revisions

Requirements

  • PHP 7.1
  • composer 1.6
  • MySQL 5
  • Node.js 9.4
  • npm 5.6
  • git 2.15

Note: These are requirements for development/testing, not for the release version of the module.

Setting up

First of all, make sure you have a running MySQL server. Create testing database processgraphql and a user processgraphql with password processgraphql that has full access to the processgraphql database. Then perform the below steps in your command line terminal.

Clone the module repository.

git clone [email protected]:dadish/ProcessGraphQL.git

Go to the repository directory.

cd ProcessGraphQL

Install dependencies. This will install both Node.js and PHP dependencies.

npm install

Now your development/testing environment should be all set.

Testing

To run the tests just do

npm test

This should run the tests and the output should look something like this.

> [email protected] test /dev/pw/ProcessGraphQL
> composer exec -v "phpunit --bootstrap test/bootstrap.php test"

> __exec_command: phpunit --bootstrap test/bootstrap.php test
Database setup started...
Database setup finished.

PHPUnit 7.0.1 by Sebastian Bergmann and contributors.

...............................................................  63 / 106 ( 59%)
...........................................                     106 / 106 (100%)

Time: 15.81 seconds, Memory: 38.00MB

OK (106 tests, 186 assertions)

Generating a test release

To build a test release that you can install as a module into your processwire installation for trying out, you can run

npm run release-test

This will generate a release version of the module and put it into test branch.

Clone this wiki locally