Skip to content

Conversation

@flovilmart
Copy link
Contributor

alternate for #786

@flovilmart
Copy link
Contributor Author

to run tests with code coverage: $ COVERAGE=1 npm test $ CODE_COVERAGE=1 npm test

@facebook-github-bot
Copy link

@flovilmart updated the pull request.

@nlutsenko
Copy link
Contributor

Sounds good, let's take this one, the only 2 things:

  • Rename COVERAGE to CODE_COVERAGE or TEST_COVERAGE, since COVERAGE is vague and can overlap with whatever people have in their bash.
  • Fix Travis-CI to export this constant when running tests. (it's inside travis.ml, under env, under global). Example here.

@flovilmart
Copy link
Contributor Author

@nlutsenko the variable is set on travis itself, otherwise it add a new test step :)

@facebook-github-bot
Copy link

@flovilmart updated the pull request.

@nlutsenko
Copy link
Contributor

Yes, but it's not if you are using global and matrix for variables. We can use the global variables in Travis settings, but I think that has a slightly different use case - keys and information people shouldn't see. I think having a version control on the configuration of CI is probably slightly better than setting a global in the configuration of one system.

@nlutsenko
Copy link
Contributor

Yup, that would work as well.
Squash and merge.

@facebook-github-bot
Copy link

@flovilmart updated the pull request.

renames COVERAGE to CODE_COVERAGE

Updates env in .travis.yaml
@flovilmart flovilmart force-pushed the flovilmart.fasterTests branch from 74b722a to 0e39b3b Compare March 3, 2016 18:09
@nlutsenko
Copy link
Contributor

@flovilmart Looks like we are not getting coverage still. Maybe remove && echo?

env:
- MONGODB_VERSION=2.6.11
- MONGODB_VERSION=3.0.8
global:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

better now

@flovilmart flovilmart changed the title Adds optional COVERAGE Adds optional coverage for faster tests Mar 3, 2016
@facebook-github-bot
Copy link

@flovilmart updated the pull request.

flovilmart added a commit that referenced this pull request Mar 3, 2016
Adds optional coverage for faster tests
@flovilmart flovilmart merged commit dbcbf60 into master Mar 3, 2016
@flovilmart flovilmart deleted the flovilmart.fasterTests branch March 3, 2016 18:16
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.

3 participants