pkgjs / wiby

"Will I break you" - a tool for testing dependents
Apache License 2.0
33 stars 7 forks source link

lib/result: add initial prototype for wiby --result #4

Closed andrewhughes101 closed 4 years ago

andrewhughes101 commented 4 years ago

Basic prototype of wiby result which will fetch the most recently completed ci runs for a dependent.

Usage: Run wiby result --dependent dependent_url from the parent packages directory (like wiby test) and the results for the latest ci runs on the wiby branch will be returned. This prototype assumes wiby test has already been run.

Sample output:

Tests on branch "wiby-i-should-pass"
{
  'build (14.x)': 'success',
  'build (12.x)': 'failure',
  'build (10.x)': 'cancelled'
}
dominykas commented 4 years ago

Code looks good, although I haven't tested it just yet - this now has conflicts that need to be resolved (sorry).

andrewhughes101 commented 4 years ago

Fixed conflicts. The result flow has changed slightly so that you now pass the url of a dependent instead of just the dependents package name. This means the result flow will work with packages that are not published to npm.

andrewhughes101 commented 4 years ago

@ljharb So the main reason I changed it to use a URL was because the current wiby test flow is using a URL and I know this makes it easier to try this tool out on a parent and dependent github repo that havent been published to npm.

I'm happy to change this to accept "whatever npm accepts" but I think that should also be applied to wiby test so I'm wondering would it be best to change both in a different PR, or change it here and open another PR changing wiby test

dominykas commented 4 years ago

would it be best to change both in a different PR

I very much agree that we should accept more formats, but I also very much agree that this needs to go into a separate PR, primarily because this PR completes the MVP-est wiby - we do need both components test and result before we can build further.

dominykas commented 4 years ago
dominykas commented 3 years ago

:tada: This PR is included in version 0.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: