Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Commit

Permalink
Add documentation on how to set up and use Coveralls
Browse files Browse the repository at this point in the history
There is no documentation on how to set up Coveralls.

With a detailed explanation, new developers can set up Coveralls easily 
and receive coverage report after each Travis build.

Let's add detailed documentation on how to set up Coveralls along with 
additional information on customization.
  • Loading branch information
vivekscl authored and Zhiyuan-Amos committed Jan 17, 2018
1 parent 1bee16f commit 0ea0ec4
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 1 deletion.
9 changes: 9 additions & 0 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ After forking the repo, links in the documentation will still point to the `se-e

Set up Travis to perform Continuous Integration (CI) for your fork. See <<UsingTravis#, UsingTravis.adoc>> to learn how to set it up.

After setting up Travis, you can optionally set up coverage reporting for your team fork (see <<UsingCoveralls#, UsingCoveralls.adoc>>).

[NOTE]
Coverage reporting could be useful for a team repository that hosts the final version but it is not that useful for your personal fork.

Optionally, you can set up AppVeyor as a second CI (see <<UsingAppVeyor#, UsingAppVeyor.adoc>>).

[NOTE]
Expand Down Expand Up @@ -470,6 +475,10 @@ See <<UsingGradle#, UsingGradle.adoc>> to learn how to use Gradle for build auto

We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See <<UsingTravis#, UsingTravis.adoc>> and <<UsingAppVeyor#, UsingAppVeyor.adoc>> for more details.

=== Coverage Reporting

We use https://coveralls.io/[Coveralls] to track the code coverage of our projects. See <<UsingCoveralls#, UsingCoveralls.adoc>> for more details.

=== Making a Release

Here are the steps to create a new release.
Expand Down
2 changes: 1 addition & 1 deletion docs/LearningOutcomes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Note <<UsingTravis#, how the AddressBook app uses Travis to perform Continuous I

== Use Code Coverage `[LO-CodeCoverage]`

Note how our CI server <<UsingTravis#, Travis uses Coveralls to report code coverage>>. (https://coveralls.io/github/se-edu/addressbook-level4?branch=master[image:https://coveralls.io/repos/github/se-edu/addressbook-level4/badge.svg?branch=master[Coverage Status]]) After setting up Coveralls for your project, you can visit Coveralls website to find details about the coverage of code pushed to your repo. https://coveralls.io/github/se-edu/addressbook-level4?branch=master[Here] is an example.
Note how our CI server <<UsingTravis#, Travis uses Coveralls to report code coverage>>. (https://coveralls.io/github/se-edu/addressbook-level4?branch=master[image:https://coveralls.io/repos/github/se-edu/addressbook-level4/badge.svg?branch=master[Coverage Status]]) After <<UsingCoveralls#, setting up Coveralls>> for your project, you can visit Coveralls website to find details about the coverage of code pushed to your repo. https://coveralls.io/github/se-edu/addressbook-level4?branch=master[Here] is an example.

*Resources*

Expand Down
53 changes: 53 additions & 0 deletions docs/UsingCoveralls.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
= Using Coveralls
:imagesDir: images
:stylesDir: stylesheets

https://coveralls.io/[Coveralls] is a web service that tracks code coverage over time for GitHub projects.
Coveralls requires Travis CI to be set up beforehand as Travis sends the coverage report from the latest build to Coveralls.
If you have not set up Travis CI, see <<UsingTravis#, UsingTravis.adoc>>. Currently, Coveralls supports Travis CI but not AppVeyor.

== Setting up Coveralls

. Go to https://coveralls.io/ and click `SIGN IN`. Then click `GITHUB SIGN IN` and enter your GitHub account details if needed.
+
. After logging in, you will be brought to the `Your Repositories` page. On the site's navigation bar, click https://coveralls.io/repos/new[ADD REPOS].
+
. Find the switch for the forked repository.
* If the organization is not shown, click `GITHUB SETTINGS` as shown below:
+
image:coveralls/github_settings.png[GitHub settings]
+
This should bring you to a GitHub page that manages the access of third-party applications. Depending on whether you are the owner of the repository, you can either grant access
+
image:grant_access.png[Grant Access]
+
or request access
+
image:request_access.png[Request Access]
+
to Coveralls so that it can access your repository.
* If your repository cannot be found, click `SYNC REPOS`.
+
image:coveralls/sync_repos.png[Sync repos]
+
. Activate the switch.
+
image:coveralls/flick_repository_switch.png[Activate the switch]
+
. Update the link of the `Coverage Status` badge at the top of your <<README#, README.adoc>> to point to that of your own repo by replacing the outlined areas with `your-org-name/your-repo-name`.
+
image:coveralls/coverage_asciidoc_code.png[Coverage Status Badge]
+
. You can now see the coverage report for your project after each Travis build by clicking on the `Coverage Status` badge.
+
image:coveralls/coverage_report.png[Coverage Report Summary]

== Disabling Coveralls Automatic Comments on Pull Requests

Coveralls automatically comments on the coverage status of the pull requests in GitHub. If it's a hindrance, you can disable it in the settings of your project in Coveralls:

. Click `Settings`.
+
. Uncheck the `LEAVE COMMENTS?` checkbox. Then click `SAVE CHANGES`.
+
image:coveralls/disable_comments.png[Disable comments, width = 942]
Binary file added docs/images/coveralls/badge_repo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/coveralls/coverage_asciidoc_code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/coveralls/coverage_report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/coveralls/disable_comments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/coveralls/flick_repository_switch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/coveralls/github_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/coveralls/sync_repos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0ea0ec4

Please sign in to comment.