Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 2.2 KB

CONTRIBUTING.md

File metadata and controls

46 lines (33 loc) · 2.2 KB

Contributing

Clone the repository and install dependencies:

$ git clone "https://github.com/apiaryio/dredd-hooks-template.git"
$ cd ./dredd-hooks-template
$ npm install

Smoke Test

There is a smoke test, which ensures everything works as described in the tutorial above. It uses the Python hooks handler as the reference implementation, so have it installed:

$ pip install dredd_hooks

Then you can run the smoke test:

$ npm test

Feature Files Linter

The feature files syntax is validated automatically. To perform the validation locally, use the lint script:

$ npm run lint

Introducing Changes

The test suite uses the Python hooks as a reference implementation. To introduce a change to this test suite, follow these steps:

  1. Implement the new behavior in the Python hooks.
  2. Change the feature files living in the Python hooks repo to describe the new behavior. If needed, add a local steps.js file implementing missing test steps.
  3. Make sure the Python hooks pass that changed test suite.
  4. Release a new version of the Python hooks.
  5. Generalize the changed (or added) feature files with placeholders, comment-out the code examples, and copy the files over to this repository. Add missing test steps implementations to the steps.js. Create a Pull Request.
  6. Make sure the smoke test passes under the Pull Request.
  7. Merge the Pull Request and let Semantic Release to produce a new version of the test suite package.
  8. Go to Python hooks repository and upgrade the test suite package there. Remove any local steps.js as the necessary steps should already be implemented in the new version of the test suite package.
  9. Go to Ruby hooks repository and upgrade the test suite package there.
  10. Go to all remaining repositories with hooks handlers and issue Pull Requests for the maintainers which help them to kick-off the upgrade. It's okay if they're incomplete, their purpose is to advertise the changes, to initiate the upgrade, and to be helpful to the maintainers.