This repository serves as an example of how to use the Codecov global uploader with Lua.
Note that the coverage is deliberately incomplete. (I swear by Kent Beck!) That way you can follow the badge link and see how Codecov works. You can view the code there, see hits and misses for coverage, etc.
Run your tests with LuaCov in order to create the necessary coverage reports. For example:
lua -lluacov awesome-tests.lua
After you've run the tests and created a LuaCov report, you can use the Codecov global uploader to push that report to Codecov. See below for further details.
Adjust the example in lua-travis-example to install any necessary dependencies and test with multiple versions of Lua (if desired).
Then simply add this to
after_success: - bash <(curl -s https://codecov.io/bash)
Add to your
env: global: - CODECOV_TOKEN=:uuid-repo-token after_success: - bash <(curl -s https://codecov.io/bash)
Other CI services
- Adjust the materials in lua-travis-example as necessary to work with your CI. (See for example: this post for an example using Drone.io.)
CODECOV_TOKEN=<your repo token>to your CI's environment variables. (Don't store the raw token in your repo.)
bash <(curl -s https://codecov.io/bash)after tests complete.
Visit the global uploader's repo to view its source and learn more about the script.