From a8f6ff27feb6600731a3efef6cff9d54469efa30 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Thu, 17 Dec 2020 10:48:10 -0500 Subject: [PATCH 01/12] Bump to 2.1.11 (#310) --- CHANGELOG.md | 11 ++++++++++- codecov/__version__.py | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c70fc15..2125692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +### `2.1.11` + +#### Fixes +- #305 Added option to disable printing of gcov-out +- #308 Handle exceptions that don't have a returncode + +#### Dependencies and Misc +- #301 Update to Python 3.9 + ### `2.1.10` #### Fixes @@ -10,7 +19,7 @@ #### Dependencies and Misc - [#290](https://github.com/codecov/codecov-python/pull/290) Bump coverage from 4.5.4 to 5.2.1 - [#291](https://github.com/codecov/codecov-python/pull/291) Update python versions -- [#292](https://github.com/codecov/codecov-python/pull/292) Add license scan report and status +- [#292](https://github.com/codecov/codecov-python/pull/292) Add license scan report and status - [#294](https://github.com/codecov/codecov-python/pull/294) Update README with accurate links - [#296](https://github.com/codecov/codecov-python/pull/296) Bump coverage from 5.2.1 to 5.3 diff --git a/codecov/__version__.py b/codecov/__version__.py index 0e467e9..bc5c0a7 100644 --- a/codecov/__version__.py +++ b/codecov/__version__.py @@ -5,4 +5,4 @@ __license__ = "Apache 2.0" __title__ = "codecov" __url__ = "https://github.com/codecov/codecov-python" -__version__ = "2.1.10" +__version__ = "2.1.11" From 147802d7403db0c21b81820ba9a8619b8d398b2b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 21 Jan 2021 13:07:57 -0500 Subject: [PATCH 02/12] Bump coverage from 5.3 to 5.3.1 (#311) Bumps [coverage](https://github.com/nedbat/coveragepy) from 5.3 to 5.3.1. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/coverage-5.3...coverage-5.3.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 0d22b4b..5599575 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,4 +1,4 @@ -coverage==5.3 +coverage==5.3.1 ddt mock pytest>=4.6.0 From 26fe18b0e7019e3415f1df525fbe4dfb72057714 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 12 Feb 2021 09:33:38 -0500 Subject: [PATCH 03/12] Bump coverage from 5.3.1 to 5.4 (#312) Bumps [coverage](https://github.com/nedbat/coveragepy) from 5.3.1 to 5.4. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/coverage-5.3.1...coverage-5.4) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 5599575..577a93c 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,4 +1,4 @@ -coverage==5.3.1 +coverage==5.4 ddt mock pytest>=4.6.0 From 158a38eed7fd6f0d2f9c9f4c5258ab1f244b6e13 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 5 Mar 2021 09:28:36 -0500 Subject: [PATCH 04/12] Bump coverage from 5.4 to 5.5 (#314) Bumps [coverage](https://github.com/nedbat/coveragepy) from 5.4 to 5.5. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/coverage-5.4...coverage-5.5) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 577a93c..7dbe1dd 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,4 +1,4 @@ -coverage==5.4 +coverage==5.5 ddt mock pytest>=4.6.0 From 51469b065f0e16d4bedf121552b5e1eb58e18125 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 1 May 2021 17:46:24 -0400 Subject: [PATCH 05/12] Upgrade to GitHub-native Dependabot (#320) Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- .github/dependabot.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..491deae --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: pip + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 From 27a9833441ab179118716b86026e526919b2a0db Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 6 Jul 2021 21:39:09 +0100 Subject: [PATCH 06/12] Add Cirrus CI (#322) * Add Cirrus CI This is a follow up of the discussion in: https://community.codecov.com/t/add-support-of-uploading-from-cirrus-ci-without-token/1028/34 and uses the bash uploader as a reference: https://github.com/codecov/codecov-bash/blob/master/codecov#L959 * Add test case for Cirrus CI --- README.md | 3 ++- codecov/__init__.py | 21 ++++++++++++++++++++- tests/test.py | 31 +++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d3a4a30..6a06173 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ after_success: ## CI Providers -| Company | Supported | Token Required | +| Company | Supported | Token Required | | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | | [AppVeyor](https://www.appveyor.com/) | Yes [![Build status](https://ci.appveyor.com/api/projects/status/sw18lsj7786bw806/branch/master?svg=true)](https://ci.appveyor.com/project/stevepeak/codecov-python/branch/master) | Private only | | [Bamboo](https://www.atlassian.com/software/bamboo) | `coming soon` | | @@ -96,6 +96,7 @@ after_success: | [Solano Labs](https://www.solanolabs.com/) | `coming soon` | | | [Travis CI](https://travis-ci.org/) | Yes [![Build Status](https://secure.travis-ci.org/codecov/codecov-python.svg?branch=master)](https://travis-ci.org/codecov/codecov-python) | Private only | | [Wercker](http://wercker.com/) | Yes | Public & Private | +| [Cirrus CI](https://cirrus-ci.org/) | Yes | Private only | | Git / Mercurial | Yes (as a fallback) | Public & Private | diff --git a/codecov/__init__.py b/codecov/__init__.py index 9490dd4..99109ed 100644 --- a/codecov/__init__.py +++ b/codecov/__init__.py @@ -329,7 +329,7 @@ def main(*argv, **kwargs): "--token", "-t", default=os.getenv("CODECOV_TOKEN"), - help="Private repository token or @filename for file containing the token. Defaults to $CODECOV_TOKEN. Not required for public repositories on Travis CI, CircleCI and AppVeyor", + help="Private repository token or @filename for file containing the token. Defaults to $CODECOV_TOKEN. Not required for public repositories on Travis CI, CircleCI, AppVeyor and CirrusCI", ) basics.add_argument( "--file", @@ -845,6 +845,25 @@ def main(*argv, **kwargs): write(" GitHub Actions CI Detected") + # --------- + # Cirrus CI + # --------- + elif os.getenv("CIRRUS_CI"): + # https://cirrus-ci.org/guide/writing-tasks/#environment-variables + query.update( + dict( + service="cirrus-ci", + slug=os.getenv("CIRRUS_REPO_FULL_NAME"), + branch=os.getenv("CIRRUS_BRANCH"), + pr=os.getenv("CIRRUS_PR"), + commit=os.getenv("CIRRUS_CHANGE_IN_REPO"), + build=os.getenv("CIRRUS_BUILD_ID"), + build_url="https://cirrus-ci.com/task/" + os.getenv("CIRRUS_TASK_ID"), + job=os.getenv("CIRRUS_TASK_NAME"), + ) + ) + write(" Cirrus CI Detected") + else: query.update( dict( diff --git a/tests/test.py b/tests/test.py index d17a0f7..98a4412 100644 --- a/tests/test.py +++ b/tests/test.py @@ -879,6 +879,37 @@ def test_ci_github(self): self.assertEqual(res["codecov"].token, "token") self.assertEqual(res["codecov"].name, "name") + @unittest.skipUnless( + os.getenv("CI") == "true" and os.getenv("CIRRUS_CI") == "true", + "Skip Cirrus CI", + ) + def test_ci_cirrus(self): + # The data used in this test follows the test case data in + # https://github.com/codecov/codecov-bash/pull/127 + # Discussion about using codecov without token for Cirrus CI can be seen in: + # https://community.codecov.com/t/add-support-of-uploading-from-cirrus-ci-without-token/1028/36 + self.set_env( + HOME="/", + CIRRUS_CI="true", + CIRRUS_REPO_FULL_NAME="codecov/ci-repo", + CIRRUS_BRANCH="master", + CIRRUS_PR="1", + CIRRUS_CHANGE_IN_REPO="180c0d097354fc1a451da8a3be5aba255f2ffd9f", + CIRRUS_BUILD_ID="777", + CIRRUS_TASK_ID="239", + CIRRUS_TASK_NAME="test" + ) + self.fake_report() + res = self.run_cli() + self.assertEqual(res["query"]["service"], "cirrus-ci") + self.assertEqual(res["query"]["slug"], "codecov/ci-repo") + self.assertEqual(res["query"]["branch"], "master") + self.assertEqual(res["query"]["pr"], "1") + self.assertEqual(res["query"]["commit"], os.getenv("CIRRUS_CHANGE_IN_REPO")) + self.assertEqual(res["query"]["build"], "777") + self.assertEqual(res["query"]["build_url"], "https://cirrus-ci.com/task/239") + self.assertEqual(res["query"]["job"], "test") + @unittest.skip("Skip CI None") def test_ci_none(self): self.set_env(CODECOV_TOKEN="token", CODECOV_NAME="name") From fcff43933beb9f242e6ef0eb4c70670f4543e289 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Mon, 2 Aug 2021 13:55:46 -0400 Subject: [PATCH 07/12] chore: bump to 2.1.12 (#323) --- CHANGELOG.md | 11 +++++++++++ codecov/__version__.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2125692..d5eb65e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +### `2.1.12` + +#### Fixes +- #322 Add Cirrus CI + +#### Dependencies and Misc +- #311 Bump coverage from 5.3 to 5.3.1 +- #312 Bump coverage from 5.3.1 to 5.4 +- #314 Bump coverage from 5.4 to 5.5 +- #320 Upgrade to GitHub-native Dependabot + ### `2.1.11` #### Fixes diff --git a/codecov/__version__.py b/codecov/__version__.py index bc5c0a7..c79ac59 100644 --- a/codecov/__version__.py +++ b/codecov/__version__.py @@ -5,4 +5,4 @@ __license__ = "Apache 2.0" __title__ = "codecov" __url__ = "https://github.com/codecov/codecov-python" -__version__ = "2.1.11" +__version__ = "2.1.12" From 46e1b8c69923a8c6a94c8de4ec1c950c7c6cc1e8 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 2 Sep 2021 17:23:17 -0400 Subject: [PATCH 08/12] Add deprecation notice (#325) * Add deprecation notice * Add link to uploader source --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 6a06173..a617c4f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ +🚨🚨 Deprecation Notice 🚨🚨 + +This uploader is being deprecated by the Codecov team. We recommend migrating to our [new uploader](https://docs.codecov.com/docs/codecov-uploader) as soon as possible to prevent any lapses in coverage. [The new uploader is open source](https://github.com/codecov/uploader), and we highly encourage submitting Issues and Pull Requests. + +You can visit our blog post to learn more about our [deprecation plan](https://about.codecov.io/blog/codecov-uploader-deprecation-plan/) + +**On February 1, 2022 this uploader will be completely deprecated and will no longer be able to upload coverage to Codecov.** + # Codecov Global Python Uploader [![codecov.io](https://codecov.io/github/codecov/codecov-python/coverage.svg?branch=master)](https://codecov.io/github/codecov/codecov-python) From 12c0dddd6350a1d511f22d363e89d9019b149164 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Tue, 5 Oct 2021 08:46:50 -0400 Subject: [PATCH 09/12] Add migration guide link (#327) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a617c4f..f6fef3a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This uploader is being deprecated by the Codecov team. We recommend migrating to our [new uploader](https://docs.codecov.com/docs/codecov-uploader) as soon as possible to prevent any lapses in coverage. [The new uploader is open source](https://github.com/codecov/uploader), and we highly encourage submitting Issues and Pull Requests. -You can visit our blog post to learn more about our [deprecation plan](https://about.codecov.io/blog/codecov-uploader-deprecation-plan/) +You can visit our [migration guide](https://docs.codecov.com/docs/deprecated-uploader-migration-guide#python-uploader) for help moving to our new uploader, and our blog post to learn more about our [deprecation plan](https://about.codecov.io/blog/codecov-uploader-deprecation-plan/) **On February 1, 2022 this uploader will be completely deprecated and will no longer be able to upload coverage to Codecov.** From 37663707961db1092134500fe19638a5c08c52c2 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Fri, 23 Sep 2022 00:01:37 -0400 Subject: [PATCH 10/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6fef3a..27531af 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ If you're seeing an **HTTP 400 error when uploading reports to S3**, make sure y ## Copyright -> Copyright 2014-2020 codecov +> Copyright 2014-2022 codecov ## License From a78512e4b00e67cfb3fccb530c9ca97a6c42eae5 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Mon, 17 Apr 2023 16:09:07 -0700 Subject: [PATCH 11/12] chore(release): bump to 3.1.13 --- codecov/__version__.py | 2 +- setup.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/codecov/__version__.py b/codecov/__version__.py index c79ac59..60d08bb 100644 --- a/codecov/__version__.py +++ b/codecov/__version__.py @@ -5,4 +5,4 @@ __license__ = "Apache 2.0" __title__ = "codecov" __url__ = "https://github.com/codecov/codecov-python" -__version__ = "2.1.12" +__version__ = "2.1.13" diff --git a/setup.py b/setup.py index b5639c7..1025c49 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,13 @@ from codecs import open import os from setuptools import setup +from setuptools.command.install import install + +class PostInstallCommand(install): + def run(self): + install.run(self) + print("\n**** The codecov package has been deprecated and will be removed by the team in the future. Please update to use the uploader (https://docs.codecov.com/docs/codecov-uploader) to prevent any breakages in workflow. ****\n") + classifiers = [ "Development Status :: 5 - Production/Stable", @@ -45,4 +52,7 @@ install_requires=["requests>=2.7.9", "coverage"], entry_points={"console_scripts": ["codecov=codecov:main"]}, python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", + cmdclass={ + 'install': PostInstallCommand, + }, ) From e553e93ed1404095acaf9a8bc3ef239675d3b88e Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Tue, 18 Apr 2023 14:38:11 -0700 Subject: [PATCH 12/12] chore(ci): bump python and update packages (#351) --- .github/workflows/build-test.yml | 6 ++--- .travis.yml | 40 -------------------------------- 2 files changed, 3 insertions(+), 43 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index b07bc8f..154d8a0 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -15,14 +15,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.5, 3.6, 3.7, 3.8, 3.9] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f69f56d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -language: python -# cache: pip -notifications: - email: false -dist: xenial -sudo: false -python: - - 2.7 - - pypy - - 3.5 - - 3.6 - - 3.7 - - 3.8 - - 3.9-dev - - pypy3 -matrix: - include: - - python: 2.7 - dist: trusty - virtualenv: - system_site_packages: true - addons: - apt: - packages: - - python-requests - - python-coverage - - python-mock - - python: 3.8 - dist: xenial - script: make format - -install: - - pip install -r tests/requirements.txt - - python setup.py install -script: - - make reinstall - - make test - # - pytest tests/test.py --cov=codecov -after_success: - - codecov