code-coverage/bot
Marco Castelluccio e2d1a5a043 Version 1.3.35 2024-11-12 12:14:09 +01:00
..
ci Revert "bot: Update to grcov version 0.8.20" 2024-10-21 15:25:41 +02:00
code_coverage_bot bot: Only log to Sentry last line of grcov's error and output 2024-11-12 11:37:25 +01:00
tests
tools
Dockerfile
README.md Run prettier on the whole repo 2024-10-21 17:22:32 +02:00
VERSION Version 1.3.35 2024-11-12 12:14:09 +01:00
requirements-dev.txt
requirements.txt build(deps): bump tqdm from 4.66.5 to 4.67.0 in /bot (#2539) 2024-11-12 11:26:51 +01:00
setup.py
taskcluster-hook-cron.json Run prettier on the whole repo 2024-10-21 17:22:32 +02:00
taskcluster-hook-repo.json Run prettier on the whole repo 2024-10-21 17:22:32 +02:00

README.md

Code Coverage Bot

This project runs as Taskcluster hooks on the firefox-ci instance, to extract and store the code coverage information from mozilla-central and try builds.

It's built using Python 3.8 and few dependencies.

Developer setup

Requirements:

Setup on your computer:

# If you have virtualenvwrapper:
mkvirtualenv -p /usr/bin/python3.8 code-coverage-bot

# Mandatory steps
pip install -r requirements.txt -r requirements-dev.txt
pip install -e .
pre-commit install

Check linting (it should be automatically done before any commit):

pre-commit run -a

Check unit tests:

pytest -v

Write your local configuration as YAML:

---
common:
  APP_CHANNEL: dev
bot:
  BACKEND_HOST: "http://localhost:8000"
  EMAIL_ADDRESSES: []
  PHABRICATOR_TOKEN: api-xxx
  PHABRICATOR_ENABLED: false
  PHABRICATOR_URL: "https://phabricator-dev.allizom.org/api/"
  GOOGLE_CLOUD_STORAGE: null

Run the bot (in cron mode):

mkdir -p build/{cache,work} # or elsewhere on your system
code-coverage-cron --cache-root=build/cache --working-dir=build/work --local-configuration=path/to/code-coverage.yml

The repo mode (with code-coverage-repo) is harder to use, as it requires a Google Cloud Storage and a Phabricator account.

Help

You can reach us on our Matrix instance: #codecoverage:mozilla.org