Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Behat to test different scenarios with semantic versioning #40

Merged
merged 7 commits into from
Jul 10, 2018

Conversation

nicwortel
Copy link
Contributor

No description provided.

*/
private function selectVersionType(string $type): void
{
if ($type === 'major') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am always more fond of a switch-statement with these kinds of if-elseif-elseif-elseif-else-statements. Just taste-wise.

Feature: Calculating a version number based on semantic versioning

Scenario: Releasing a major version
Given a release on this branch with version "1.0.0"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to read this line a few times to understand

  • Given the latest release on this branch is x.x.x
  • Given the latest tag on this branch is x.x.x

Scenario: Releasing a patch version
Given a release on this branch with version "1.0.9"
When I release a new patch version
Then version "1.0.10" should be released

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all cases (that seem common sense from a developers perspective) are present.
Does a major release from 1.0.1 really go to 2.0.0? Etc.

We might need some tests for the following cases.

  • 1.0.1 > major > 2.0.0
  • 1.1.0 > major > 2.0.0
  • 1.1.1 > minor > 1.2.0
  • 1.1.1 > patch > 1.1.2

And what happens when I release a patch or minor on 2.0.0-beta.2?

@nicwortel nicwortel merged commit 057693f into master Jul 10, 2018
@nicwortel nicwortel deleted the behat branch July 10, 2018 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants