Shopify / graphql-js-schema

Transforms the JSON representation of a GraphQL schema into a set of ES6 type modules
MIT License
35 stars 12 forks source link

Detect whether or not we're running in CI, and if we are, output tests properly #3

Closed minasmart closed 8 years ago

minasmart commented 8 years ago

This adds some logic to package.json where if we see that we're running in CI, output tests in a format CI actually understands, for a much nicer test display

minasmart commented 8 years ago

@mikkoh @jamesmacaulay @tessalt take a look!

Also @mikkoh, suggesting we put this in the module generator too, since we're always workin' with circle.

tessalt commented 8 years ago

so when you're developing locally do you set CIRCLE_TEST_DIR? because these will fail locally right?

minasmart commented 8 years ago

Test output shows up in test summary like:

image

Artifacts are visible like this:

image

minasmart commented 8 years ago

@tessalt nope. It searches for the $CI var, and if that's not set, none of the special reporter or output options are set. Since you wouldn't normally have $CI on a dev machine, it should run fine locally, and only do the special thing in CI.

tessalt commented 8 years ago

ahh cool i should add this to my similar tasks