README.md (3040B)
1 # Cover Codecov 2 3 [](https://travis-ci.org/codecov/codecov-racket) 4 [](https://codecov.io/github/codecov/codecov-racket?branch=master) 5 [](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fcodecov-racket?ref=badge_shield) 6 7 Adds [Codecov](https://codecov.io/) support to [Cover](https://github.com/florence/cover). 8 9 _Note_: The currently supported methods of posting data to [Codecov](https://codecov.io/) are [Travis CI](https://travis-ci.org/) and [Gitlab CI](https://about.gitlab.com/gitlab-ci/). 10 11 ## Use with Travis CI 12 First enable your repository on Travis and Codecov. 13 Next add `cover-codecov` to the `build-deps` of your `info.rkt`. 14 Then create a `.travis.yml` in the root of your repository. 15 16 ```yml 17 # .travis.yml 18 language: c 19 sudo: false 20 env: 21 global: 22 - RACKET_DIR=~/racket 23 matrix: 24 - RACKET_VERSION=6.2 # Set this to the version of racket you use 25 26 before_install: # Install Racket 27 - git clone https://github.com/greghendershott/travis-racket.git ../travis-racket 28 - cat ../travis-racket/install-racket.sh | bash 29 - export PATH="${RACKET_DIR}/bin:${PATH}" 30 31 install: raco pkg install --deps search-auto $TRAVIS_BUILD_DIR # install dependencies 32 33 script: 34 - raco test $TRAVIS_BUILD_DIR # run tests. you wrote tests, right? 35 36 after_success: 37 - raco pkg install --deps search-auto cover cover-codecov 38 - raco cover -f codecov -d $TRAVIS_BUILD_DIR/coverage . # generate coverage information for coveralls 39 ``` 40 The above Travis configuration will install any project dependencies, test your project, and report coverage information to Codecov. 41 42 For additional Travis configuration information look at [Travis Racket](https://github.com/greghendershott/travis-racket). 43 44 ## Use with Gitlab-CI 45 Like with Travis, except that you should use the Gitlab format 46 of the CI configuration file: 47 48 ```yml 49 image: frolvlad/alpine-glibc 50 51 variables: 52 RACKET_DIR: "$HOME/racket" 53 RACKET_VERSION: "6.8" # use the desired version of racket 54 55 before_script: 56 - echo "ipv6" >> /etc/modules 57 - apk update 58 - apk add git curl bash openssl sqlite-libs 59 - git clone https://github.com/greghendershott/travis-racket.git ~/ci-racket 60 - cat ~/ci-racket/install-racket.sh | bash # pipe to bash not sh! 61 - export PATH="$RACKET_DIR/bin:$PATH" #install-racket.sh can't set for us 62 - raco pkg install --auto $CI_PROJECT_DIR 63 64 stages: 65 - test 66 - cover 67 68 test: 69 stage: test 70 script: 71 - raco test $CI_PROJECT_DIR 72 73 cover: 74 stage: cover 75 script: 76 - raco pkg install --auto cover cover-codecov 77 - raco cover -f codecov $CI_PROJECT_DIR 78 ``` 79 80 81 ## License 82 [](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fcodecov-racket?ref=badge_large)