Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit 645d57c

Browse files
authored
Add troubleshooting section about fork builds
1 parent 6699428 commit 645d57c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,19 @@ sbt codacyCoverage
8484
Failing tests can be caused by the usage of macros in Scala 2.10.
8585
Consider upgrading to Scala 2.11 for full macro support.
8686

87+
## Troubleshooting
88+
89+
1. Builds from forks are failing on Coverage?
90+
91+
If you are using an automated CI that also runs builds from forks but does not have access to the
92+
project token to send coverage you should protect the coverage step in your configuration to avoid
93+
the build failure.
94+
95+
**Example**
96+
```
97+
if [[ -n "$CODACY_PROJECT_TOKEN" ]]; then sbt codacyCoverage; else echo "Skipped coverage reporting since no token was found"; fi
98+
```
99+
87100
## Java 6
88101

89102
Due to a limitation in Java 6, the plugin is unable to establish a connection to codacy.com.

0 commit comments

Comments
 (0)