-
Notifications
You must be signed in to change notification settings - Fork 90
Docs to onboard contributor #440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
60eaa10
Support local configuration
43a5c70
Bot readme
dec3336
Only document cron mode
af979d4
backend: Datadog is optional
6e8c323
backend: Support local configuration
3574ed7
backend: Add local config in doc
2fce8c9
frontend: Update README
af7cd3f
Add Matrix link
642ca08
Update backend/README.md
5756b7a
Update backend/README.md
c6a8801
Update bot/README.md
b61128f
Update bot/README.md
8269196
Update bot/README.md
824b4bc
bot: Remove bad default on local config
efec5c9
bot: Use only bot prefix for secrets
c2548ca
virtualenv are not mandatory
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[settings] | ||
known_first_party = code_coverage_backend,code_coverage_bot,code_coverage_events,code_coverage_tools,conftest,firefox_code_coverage | ||
known_third_party = connexion,datadog,dateutil,fakeredis,flask,flask_cors,flask_talisman,google,hglib,jsone,jsonschema,libmozdata,libmozevent,logbook,magic,pytest,pytz,raven,redis,requests,responses,setuptools,structlog,taskcluster,tenacity,werkzeug,zstandard | ||
known_third_party = connexion,datadog,dateutil,fakeredis,flask,flask_cors,flask_talisman,google,hglib,jsone,jsonschema,libmozdata,libmozevent,logbook,magic,pytest,pytz,raven,redis,requests,responses,setuptools,structlog,taskcluster,tenacity,werkzeug,yaml,zstandard | ||
force_single_line = True | ||
default_section=FIRSTPARTY | ||
line_length=159 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Code Coverage Bot | ||
|
||
This project runs as [Taskcluster hooks](https://firefox-ci-tc.services.mozilla.com/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: | ||
|
||
- Python 3.8 | ||
- Mercurial 5.3 | ||
- (optional) [virtualenv](https://virtualenv.pypa.io/en/stable/) | ||
- (optional) [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/) | ||
|
||
Setup on your computer: | ||
|
||
```console | ||
# 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): | ||
|
||
```console | ||
pre-commint run -a | ||
``` | ||
|
||
Check unit tests: | ||
|
||
```console | ||
pytest -v | ||
``` | ||
|
||
Write your local configuration as YAML: | ||
|
||
```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): | ||
|
||
```console | ||
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](https://chat.mozilla.org/#/room/#codecoverage:mozilla.org) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.