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

Adds optional coverage for faster tests #807

Merged
merged 1 commit into from
Mar 3, 2016
Merged

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
@nlutsenko
Copy link
Contributor

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

@@ -5,8 +5,11 @@ language: node_js
node_js:
- "4.3"
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.

None yet

3 participants