updated readme with travis info
This commit is contained in:
parent
41d3c41a6a
commit
03a8eb3162
26
README.md
26
README.md
|
@ -14,7 +14,7 @@ Code coverage can be generated by specifying the `-c <format>` flag.
|
|||
Right now the valid formats are: `html` and `coveralls`.
|
||||
|
||||
`html` simply generates html files for each source file containing coverage information and
|
||||
highlighted source code.
|
||||
highlighted source code.
|
||||
|
||||
`coveralls` generates a coveralls coverage report and sends it to coveralls.
|
||||
Using coveralls requires the "COVERALLS_REPO_TOKEN" to be set, and needs bash and curl.
|
||||
|
@ -26,6 +26,30 @@ The directory that the coverage is outputted to can be specified with the `-d` f
|
|||
|
||||
If any tests run by `rackunit` fail, Cover will return with exit code `1`. If all tests pass it will return with exit code `0`.
|
||||
|
||||
## Use with TravisCI
|
||||
|
||||
If your code is hosted on a public github repo then you can use this plugin in conjunction with [TravisCI](https://travis-ci.org/) and [Coveralls](https://coveralls.io/).
|
||||
Just enable your repository on both services and then add a `.travis.yml` file to your repo with the following contents:
|
||||
```yml
|
||||
langauge: c
|
||||
env:
|
||||
- RACKET_VERSION=6.1.1
|
||||
|
||||
before_install:
|
||||
- git clone https://github.com/greghendershott/travis-racket.git ../travis-racket
|
||||
- cat ../travis-racket/install-racket.sh | bash
|
||||
|
||||
script:
|
||||
- /usr/racket/bin/raco pkg install --deps search-auto $TRAVIS_BUILD_DIR # install dependencies
|
||||
- /usr/racket/bin/raco test $TRAVIS_BUILD_DIR # run tests. you wrote tests, right?
|
||||
- /usr/racket/bin/raco cover -c coveralls -d $TRAVIS_BUILD_DIR/coverage . # generate coverage information
|
||||
```
|
||||
The above Travis configuration will install any project dependencies, test your project, and report coverage information to coveralls.
|
||||
|
||||
For a contrived example project, look at an [example](https://github.com/rpless/rkt-ci-example).
|
||||
For additional Travis configuration information look at [Travis Racket](https://github.com/greghendershott/travis-racket).
|
||||
|
||||
Note: This currently only works for public Github repos. This project does not support `coveralls.yml` configurations for private repos.
|
||||
|
||||
## Internals
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user