Skip to content

Instantly share code, notes, and snippets.

@netmilk
Last active December 22, 2015 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netmilk/769d5d588f6c837ce12b to your computer and use it in GitHub Desktop.
Save netmilk/769d5d588f6c837ce12b to your computer and use it in GitHub Desktop.
Using Dredd, PHP and Travis CI

Using API Blueprint, Dredd, PHP and Travis CI

In case you don't have Node.js installed locally use NVM:

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
$ nvm install v0.12.2
$ nvm use v0.12.2
$ nvm alias default v0.12.2
  • Install dredd locally with npm install -g dredd@1.0.1, run dredd init and select langauge nodejs </confusion warning> and answer all other questions.

  • Edit generated dredd.yml and change the language line:

language: vendor/bin/dredd-hooks-php
  • Merge following lines into your .travis.yml
pre_install:
  - npm install -g dredd@1.0.1
  - composer require ddelnano/dredd-hooks-php:~1.0.0
  
before_script:
  - dredd
  • Save, commit and push all of the above

Documentation:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment