Skip to content

Commit a117839

Browse files
author
Bastien Abadie
committed
Patch marco-c/firefox-code-coverage to work in mozilla/code-coverage, fixes #232
1 parent 68ec865 commit a117839

File tree

11 files changed

+34
-75
lines changed

11 files changed

+34
-75
lines changed

.isort.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[settings]
2-
known_first_party = code_coverage_backend,code_coverage_bot,code_coverage_events,code_coverage_tools,conftest
2+
known_first_party = code_coverage_backend,code_coverage_bot,code_coverage_events,code_coverage_tools,conftest,firefox_code_coverage
33
known_third_party = connexion,datadog,dateutil,fakeredis,flask,flask_cors,flask_talisman,google,hglib,jsone,jsonschema,libmozdata,libmozevent,logbook,pytest,pytz,raven,redis,requests,responses,setuptools,structlog,taskcluster,werkzeug,zstandard
44
force_single_line = True
55
default_section=FIRSTPARTY

.taskcluster.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,25 @@ tasks:
137137
138138
source: https://github.com/mozilla/code-coverage
139139

140+
- taskId: {$eval: as_slugid("report_check_tests")}
141+
provisionerId: aws-provisioner-v1
142+
workerType: github-worker
143+
created: {$fromNow: ''}
144+
deadline: {$fromNow: '1 hour'}
145+
payload:
146+
maxRunTime: 3600
147+
image: python:3.7
148+
command:
149+
- sh
150+
- -lxce
151+
- "git clone --quiet ${repository} /src && cd /src && git checkout ${head_rev} -b checks &&
152+
cd /src/report && ./ci-test.sh"
153+
metadata:
154+
name: "Code Coverage Report checks: unit tests"
155+
description: Check python code with unittest
156+
157+
source: https://github.com/mozilla/code-coverage
158+
140159
- taskId: {$eval: as_slugid("backend_build")}
141160
created: {$fromNow: ''}
142161
deadline: {$fromNow: '1 hour'}

report/.flake8

Lines changed: 0 additions & 3 deletions
This file was deleted.

report/.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.pytest_cache/
2-
*.pyc
3-
4-
# Distribution / packaging
51
.Python
62
build/
73
develop-eggs/
@@ -22,3 +18,10 @@ share/python-wheels/
2218
*.egg
2319
MANIFEST
2420
cache/
21+
ccov-artifacts/
22+
grcov
23+
grcov_ver
24+
lcov-bin/
25+
lcov/
26+
output.info
27+
report/

report/.isort.cfg

Lines changed: 0 additions & 3 deletions
This file was deleted.

report/.pre-commit-config.yaml

Lines changed: 0 additions & 38 deletions
This file was deleted.

report/.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

report/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# firefox-code-coverage
22

3-
[![Build Status](https://travis-ci.org/marco-c/firefox-code-coverage.svg?branch=master)](https://travis-ci.org/marco-c/firefox-code-coverage)
4-
53
A description on how to use this tool is available at https://developer.mozilla.org/en-US/docs/Mozilla/Testing/Measuring_Code_Coverage_on_Firefox.

report/ci-test.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash -e
2+
3+
pip install --disable-pip-version-check --no-cache-dir --quiet -r test-requirements.txt
4+
5+
python -m unittest discover tests
6+
python setup.py sdist bdist_wheel
7+
pip install dist/firefox_code_coverage-1.0.0.tar.gz

report/test-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
pre-commit==1.18.3
21
setuptools==41.4.0
32
wheel==0.33.6

report/tox.ini

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)