Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -489,3 +489,33 @@ tasks:
description: Code Coverage Github automated release
owner: bastien@mozilla.com
source: https://github.com/mozilla/code-coverage

- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
then:
taskId: {$eval: as_slugid("report_deploy_pypi")}
dependencies:
- {$eval: as_slugid("report_check_tests")}
provisionerId: proj-relman
workerType: ci
created: {$fromNow: ''}
deadline: {$fromNow: '1 hour'}
payload:
features:
# Needed for access to secret
taskclusterProxy: true
maxRunTime: 3600
image: "${taskboot_image}"
env:
TASKCLUSTER_SECRET: "project/relman/code-coverage/release"
command:
- sh
- -lxce
- "git clone ${repository} /project && cd /project && git checkout ${head_rev} -b release &&
taskboot --target=/project/report deploy-pypi"
scopes:
- "secrets:get:project/relman/code-coverage/release"
metadata:
name: "Code Coverage Report: publish on pypi"
description: Code Coverage Github Pypi publication for report
owner: bastien@mozilla.com
source: https://github.com/mozilla/code-coverage
3 changes: 3 additions & 0 deletions report/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-exclude tests *

include VERSION
include *.txt
1 change: 1 addition & 0 deletions report/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.1.6
3 changes: 2 additions & 1 deletion report/ci-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ pip install --disable-pip-version-check --no-cache-dir --quiet -r test-requireme

python -m unittest discover tests
python setup.py sdist bdist_wheel
pip install dist/firefox_code_coverage-1.0.0.tar.gz
VERSION=$(cat VERSION)
pip install dist/firefox-code-coverage-$VERSION.tar.gz
45 changes: 39 additions & 6 deletions report/setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,45 @@
# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from setuptools import find_packages
from setuptools import setup
import setuptools

setup(
name="firefox_code_coverage",
version="1.0.0",

def read_requirements(file_):
lines = []
with open(file_) as f:
for line in f.readlines():
line = line.strip()
if line.startswith("https://"):
line = line.split("#")[1].split("egg=")[1]
elif line == "" or line.startswith("#") or line.startswith("-"):
continue
line = line.split("#")[0].strip()
lines.append(line)
return sorted(list(set(lines)))


with open("VERSION") as f:
VERSION = f.read().strip()


setuptools.setup(
name="firefox-code-coverage",
version=VERSION,
description="Code Coverage Report generator for Firefox",
packages=find_packages(exclude=["contrib", "docs", "tests"]),
author="Mozilla Release Management Analysis (sallt)",
author_email="release-mgmt-analysis@mozilla.com",
url="https://github.com/mozilla/code-coverage",
tests_require=read_requirements("test-requirements.txt"),
install_requires=read_requirements("requirements.txt"),
packages=setuptools.find_packages(),
include_package_data=True,
zip_safe=False,
license="MPL2",
entry_points={
"console_scripts": [
"firefox-code-coverage = firefox_code_coverage.codecoverage:main"
]
},
)