Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save TimMurphy/64b39ee13cd575e449ae to your computer and use it in GitHub Desktop.
Save TimMurphy/64b39ee13cd575e449ae to your computer and use it in GitHub Desktop.
Versioning with Git & Continuous integration
Feature: Developer can request current branch to be published
As a developet
I want tell to the CI to publish the current branch
# git describe --tags --long
# http://stackoverflow.com/a/1064505/22941
Scenario Outline: Publish master branch with valid arguments
Given the current branch is master
When npm publish <bumpLevel> is called
Then branch publish/master/<bumpLevel> is created and pushed to origin
Examples:
| bumpLevel |
| major |
| minor |
| patch |
Scenario Outline: Publish master branch with invalid bumpLevel
Given the current branch is master
When npm publish <invalidBumpLevel> is called
Then an error is thrown
And correct usage is displayed
Examples:
| bumpLevel |
| not=major |
| not=minor |
| not=patch |
Scenario: other than master branch
Given todo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment