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

Commit 693d8e7

Browse files
committed
Add account token steps to readme
1 parent 6b7e13c commit 693d8e7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,26 @@ npm run test-with-coverage
154154

155155
## Extras
156156

157+
### Account Token
158+
159+
To send coverage using your account/api token you can follow the following steps.
160+
161+
* Add test with coverage step to your package.json:
162+
163+
```json
164+
"scripts": {
165+
"test-with-coverage": "cat ./coverage/lcov.info | codacy-coverage --accountToken <account-token> --username <username> --projectName <project-name>"
166+
}
167+
```
168+
169+
* Run your tests with:
170+
171+
```sh
172+
npm run test-with-coverage
173+
```
174+
175+
As an alternative you can also export `CODACY_ACCOUNT_TOKEN` instead of passing `--accountToken <account-token>` to the CLI.
176+
157177
### Force custom language (e.g. Typescript, Coffeescript, C, ...)
158178

159179
* Pass an extra parameter to the codacy-coverage reporter `--language typescript` or `--language coffeescript`.

0 commit comments

Comments
 (0)