aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-09 16:10:31 +0800
committerGitHub <noreply@github.com>2018-07-09 16:10:31 +0800
commit028184947feca7de420929f587eca9662b3bb1af (patch)
tree1ec55a60e0b26ec978621843ece44d4d6277f116
parent14c96e0b97725244dcd7f671dac97f18d473432f (diff)
parentf172908bde401fb2d3bfc49d2f230555c77f8297 (diff)
downloaddexon-sol-tools-028184947feca7de420929f587eca9662b3bb1af.tar
dexon-sol-tools-028184947feca7de420929f587eca9662b3bb1af.tar.gz
dexon-sol-tools-028184947feca7de420929f587eca9662b3bb1af.tar.bz2
dexon-sol-tools-028184947feca7de420929f587eca9662b3bb1af.tar.lz
dexon-sol-tools-028184947feca7de420929f587eca9662b3bb1af.tar.xz
dexon-sol-tools-028184947feca7de420929f587eca9662b3bb1af.tar.zst
dexon-sol-tools-028184947feca7de420929f587eca9662b3bb1af.zip
Merge pull request #833 from feuGeneA/issue-823
document how to check test coverage on a fork
-rw-r--r--CONTRIBUTING.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 39c3239eb..ff55ac4c6 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -21,6 +21,18 @@ If you're adding a new public function/member, make sure you document it with Ja
If the sub-package you are modifying has a `CHANGELOG.md` file, make sure to add an entry in it for the change made to the package. For published packages, only changes that modify the public interface or behavior of the package need a CHANGELOG entry.
+#### Enabling code coverage checks on your fork
+
+If you simply fork the repo and then create a PR sourced from it, your PR will fail its test coverage check. This is because the 0x CircleCI configuration sets the `COVERALLS_REPO_TOKEN` environment variable to the token for 0xProject/0x-monorepo, but when running the check against your fork the token needs to match the repo that is your fork, rather than the 0x repo.
+
+To facilitate this check, after creating your fork, but before creating the branch for your PR, do the following:
+
+1. Log in to [coveralls.io](https://coveralls.io/), go to Add Repos, and enable your fork. Then go to the settings for that repo, and copy the Repo Token identifier.
+2. Log in to [CircleCI](https://circleci.com/login), go to Add Projects, click the Set Up Project button corresponding to your fork, and then click Start Building. (Aside from step 3 below, no actual set up is needed, since it will use the `.circleci/config.yml` file in 0x-monorepo, so you can ignore all of the instruction/explanation given on the page with the Start Building button.)
+3. In CircleCI, configure your project to add an Environment Variable, with name `COVERALLS_REPO_TOKEN`, and for the value paste in the Repo Token you copied in step 1.
+
+Now, when you push to your branch, CircleCI will automatically run all of the checks in your own instance, and the coverage check will work since it has the proper Repo Token, and the PR will magically refer to your own checks rather than running them in the 0x CircleCI instance.
+
### Styleguide
We use [TSLint](https://palantir.github.io/tslint/) with [custom configs](https://github.com/0xProject/0x-monorepo/tree/development/packages/tslint-config) to keep our code style consistent.