You will need Vagrant and one of its providers.
We currently use VirtualBox but any provider should work just as well.
Clone the project:
git clone [email protected]:crate/crate-pdo.git cd crate-pdo
Start up the Vagrant machine:
vagrant up
When run for the first time, it will also run the needed provisioning.
If you are using IntelliJ or PhpStorm IDE you can follow the IDE guide to set up your remote interpreter and test environment.
Get Composer and install the dependencies:
vagrant ssh cd /vagrant curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer composer install
If the environment is outdated, you can upgrade it:
composer update
If you see messages like Warning: No code coverage driver available
when running
the tests, you will need to install the xdebug
extension:
pecl install xdebug
It may happen that you will have to re-install it, for example after your PHP version has been upgraded by your package manager.
You can run the tests like:
vagrant ssh cd /vagrant # Run test suite composer run test # Output coverage report as HTML composer run -- test --coverage-html ./report open report/index.html # Run specific tests composer run -- test --filter "testFetchColumn"
# Run code style checks composer run check-style # Some code style quirks can be automatically fixed composer run fix-style
Install prerequisites:
# Install different PHP releases and Composer. brew install [email protected] [email protected] [email protected] brew-php-switcher composer # Select PHP version. brew-php-switcher 7.3 brew-php-switcher 7.4 brew-php-switcher 8.0 # Install `xdebug` extension into each environment for tracking code coverage. pecl install xdebug
Get the sources:
git clone [email protected]:crate/crate-pdo.git
Setup project dependencies:
composer install
# Run CrateDB docker run -it --rm \ --mount type=bind,source=$PWD/test/provisioning/crate.yml,target=/crate/config/crate.yml \ --mount type=bind,source=$PWD/test/provisioning/keystore,target=/vagrant/test/provisioning/keystore \ --mount type=bind,source=$PWD/test/provisioning/truststore,target=/vagrant/test/provisioning/truststore \ --publish 4200:4200 --publish 5432:5432 crate/crate:nightly # Run test suite on current/default version of PHP composer run test # Run tests on both PHP7 and PHP8 to get the full picture of coverage composer run multicover open build/multicover/html/index.html
- The documentation is written using Sphinx and ReStructuredText.
- Python>=3.7 is required.
Change into the docs
directory:
$ cd docs
For help, run:
$ make
Crate Docs Build
Run `make <TARGET>`, where <TARGET> is one of:
dev Run a Sphinx development server that builds and lints the
documentation as you edit the source files
html Build the static HTML output
check Build, test, and lint the documentation
reset Reset the build cache
You must install fswatch to use the dev
target.
CI is configured to run make check
from the docs
directory.
Read the Docs (RTD) automatically deploys the documentation whenever a configured branch is updated.
To make changes to the RTD configuration (e.g., to activate or deactivate a release version), please contact the `@crate/docs`_ team.
Check the versions hosted on ReadTheDocs.
We should only be hosting the docs for latest, the last three minor release branches of the last major release, and the last minor release branch corresponding to the last two major releases.
For example:
latest
0.6
0.5
0.4
Because this project has not yet had a major release, as of yet, there are no major releases before 0 to include in this list.
To make changes to the RTD configuration (e.g., to activate or deactivate a release version), please contact the @crate/tech-writing team.