From 35ae6481870744e6faf05b1aedc24cb9884c779d Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Mon, 12 Jun 2023 22:46:17 +0200 Subject: [PATCH 01/13] re-enable code-cov --- .github/workflows/ci.yml | 82 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a35c32743..d527197eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,3 +44,85 @@ jobs: # Fake a TTY shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"' run: "python -m tox" +--- +- name: Codecov + # You may pin to the exact commit or the version. + # uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d + uses: codecov/codecov-action@v3.1.4 + with: + # Repository upload token - get it from codecov.io. Required only for private repositories + token: # optional + # Path to coverage file to upload + file: # optional + # Comma-separated list of files to upload + files: # optional + # Directory to search for coverage reports. + directory: # optional + # Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome) + flags: # optional + # Specify the path of a full Codecov report to re-upload + full_report: # optional + # The commit SHA of the parent for which you are uploading coverage. If not present, the parent will be determined using the API of your repository provider. When using the repository providers API, the parent is determined via finding the closest ancestor to the commit. + commit_parent: # optional + # Don't upload files to Codecov + dry_run: # optional + # Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON) + env_vars: # optional + # Specify whether or not CI build should fail if Codecov runs into an error during upload + fail_ci_if_error: # optional + # Comma-separated list, see the README for options and their usage. Options include `network`, `fixes`, `search`. + functionalities: # optional + # Run with gcov support + gcov: # optional + # Extra arguments to pass to gcov + gcov_args: # optional + # gcov executable to run. Defaults to gcov + gcov_executable: # optional + # Paths to ignore during gcov gathering + gcov_ignore: # optional + # Paths to include during gcov gathering + gcov_include: # optional + # Move discovered coverage reports to the trash + move_coverage_to_trash: # optional + # User defined upload name. Visible in Codecov UI + name: # optional + # Specify a filter on the files listed in the network section of the Codecov report. Useful for upload-specific path fixing + network_filter: # optional + # Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing + network_prefix: # optional + # Override the assumed OS. Options are aarch64 | alpine | linux | macos | windows. + os: # optional + # Specify the branch name + override_branch: # optional + # Specify the build number + override_build: # optional + # Specify the commit SHA + override_commit: # optional + # Specify the pull request number + override_pr: # optional + # Specify the git tag + override_tag: # optional + # Used when not in git/hg project to identify project root directory + root_dir: # optional + # Specify the slug manually (Enterprise use) + slug: # optional + # Run with swift coverage support + swift: # optional + # Specify the swift project to speed up coverage conversion + swift_project: # optional + # The upstream http proxy server to connect through + upstream_proxy: # optional + # Change the upload host (Enterprise use) + url: # optional + # Specify whether the Codecov output should be verbose + verbose: # optional + # Specify which version of the Codecov Uploader should be used. Defaults to `latest` + version: # optional + # Directory in which to execute codecov.sh + working-directory: # optional + # Run with xcode support + xcode: # optional + # Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult + xcode_archive_path: # optional + # Add additional uploader args that may be missing in the Action + xtra_args: # optional From 6bf7bb909c0811583de4dbcd4eb071ae36a0a936 Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Mon, 12 Jun 2023 22:51:00 +0200 Subject: [PATCH 02/13] fixup --- .github/workflows/ci.yml | 163 +++++++++++++++++++-------------------- 1 file changed, 81 insertions(+), 82 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d527197eb..86eb0aab4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,85 +44,84 @@ jobs: # Fake a TTY shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"' run: "python -m tox" ---- -- name: Codecov - # You may pin to the exact commit or the version. - # uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d - uses: codecov/codecov-action@v3.1.4 - with: - # Repository upload token - get it from codecov.io. Required only for private repositories - token: # optional - # Path to coverage file to upload - file: # optional - # Comma-separated list of files to upload - files: # optional - # Directory to search for coverage reports. - directory: # optional - # Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome) - flags: # optional - # Specify the path of a full Codecov report to re-upload - full_report: # optional - # The commit SHA of the parent for which you are uploading coverage. If not present, the parent will be determined using the API of your repository provider. When using the repository providers API, the parent is determined via finding the closest ancestor to the commit. - commit_parent: # optional - # Don't upload files to Codecov - dry_run: # optional - # Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON) - env_vars: # optional - # Specify whether or not CI build should fail if Codecov runs into an error during upload - fail_ci_if_error: # optional - # Comma-separated list, see the README for options and their usage. Options include `network`, `fixes`, `search`. - functionalities: # optional - # Run with gcov support - gcov: # optional - # Extra arguments to pass to gcov - gcov_args: # optional - # gcov executable to run. Defaults to gcov - gcov_executable: # optional - # Paths to ignore during gcov gathering - gcov_ignore: # optional - # Paths to include during gcov gathering - gcov_include: # optional - # Move discovered coverage reports to the trash - move_coverage_to_trash: # optional - # User defined upload name. Visible in Codecov UI - name: # optional - # Specify a filter on the files listed in the network section of the Codecov report. Useful for upload-specific path fixing - network_filter: # optional - # Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing - network_prefix: # optional - # Override the assumed OS. Options are aarch64 | alpine | linux | macos | windows. - os: # optional - # Specify the branch name - override_branch: # optional - # Specify the build number - override_build: # optional - # Specify the commit SHA - override_commit: # optional - # Specify the pull request number - override_pr: # optional - # Specify the git tag - override_tag: # optional - # Used when not in git/hg project to identify project root directory - root_dir: # optional - # Specify the slug manually (Enterprise use) - slug: # optional - # Run with swift coverage support - swift: # optional - # Specify the swift project to speed up coverage conversion - swift_project: # optional - # The upstream http proxy server to connect through - upstream_proxy: # optional - # Change the upload host (Enterprise use) - url: # optional - # Specify whether the Codecov output should be verbose - verbose: # optional - # Specify which version of the Codecov Uploader should be used. Defaults to `latest` - version: # optional - # Directory in which to execute codecov.sh - working-directory: # optional - # Run with xcode support - xcode: # optional - # Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult - xcode_archive_path: # optional - # Add additional uploader args that may be missing in the Action - xtra_args: # optional + - name: Codecov + # You may pin to the exact commit or the version. + # uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d + uses: codecov/codecov-action@v3.1.4 + with: + # Repository upload token - get it from codecov.io. Required only for private repositories + token: # optional + # Path to coverage file to upload + file: # optional + # Comma-separated list of files to upload + files: # optional + # Directory to search for coverage reports. + directory: # optional + # Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome) + flags: # optional + # Specify the path of a full Codecov report to re-upload + full_report: # optional + # The commit SHA of the parent for which you are uploading coverage. If not present, the parent will be determined using the API of your repository provider. When using the repository providers API, the parent is determined via finding the closest ancestor to the commit. + commit_parent: # optional + # Don't upload files to Codecov + dry_run: # optional + # Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON) + env_vars: # optional + # Specify whether or not CI build should fail if Codecov runs into an error during upload + fail_ci_if_error: # optional + # Comma-separated list, see the README for options and their usage. Options include `network`, `fixes`, `search`. + functionalities: # optional + # Run with gcov support + gcov: # optional + # Extra arguments to pass to gcov + gcov_args: # optional + # gcov executable to run. Defaults to gcov + gcov_executable: # optional + # Paths to ignore during gcov gathering + gcov_ignore: # optional + # Paths to include during gcov gathering + gcov_include: # optional + # Move discovered coverage reports to the trash + move_coverage_to_trash: # optional + # User defined upload name. Visible in Codecov UI + name: # optional + # Specify a filter on the files listed in the network section of the Codecov report. Useful for upload-specific path fixing + network_filter: # optional + # Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing + network_prefix: # optional + # Override the assumed OS. Options are aarch64 | alpine | linux | macos | windows. + os: # optional + # Specify the branch name + override_branch: # optional + # Specify the build number + override_build: # optional + # Specify the commit SHA + override_commit: # optional + # Specify the pull request number + override_pr: # optional + # Specify the git tag + override_tag: # optional + # Used when not in git/hg project to identify project root directory + root_dir: # optional + # Specify the slug manually (Enterprise use) + slug: # optional + # Run with swift coverage support + swift: # optional + # Specify the swift project to speed up coverage conversion + swift_project: # optional + # The upstream http proxy server to connect through + upstream_proxy: # optional + # Change the upload host (Enterprise use) + url: # optional + # Specify whether the Codecov output should be verbose + verbose: # optional + # Specify which version of the Codecov Uploader should be used. Defaults to `latest` + version: # optional + # Directory in which to execute codecov.sh + working-directory: # optional + # Run with xcode support + xcode: # optional + # Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult + xcode_archive_path: # optional + # Add additional uploader args that may be missing in the Action + xtra_args: # optional From cdc34880d655bdb9c0a83c4484fbf322c665cbae Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Mon, 12 Jun 2023 22:51:27 +0200 Subject: [PATCH 03/13] fixup --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86eb0aab4..60fffce32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,4 +124,3 @@ jobs: # Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult xcode_archive_path: # optional # Add additional uploader args that may be missing in the Action - xtra_args: # optional From 5b48e2cf05d11acc5adf854a86f09c73c661db78 Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Tue, 13 Jun 2023 17:49:37 +0200 Subject: [PATCH 04/13] this simple? --- .github/workflows/ci.yml | 82 +--------------------------------------- 1 file changed, 1 insertion(+), 81 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60fffce32..c4e2740af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,90 +37,10 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions + python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions codecov - name: "Run tox targets for ${{ matrix.python-version }}" if: ${{ matrix.tox-test == 'default' }} # Fake a TTY shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"' run: "python -m tox" - - name: Codecov - # You may pin to the exact commit or the version. - # uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d - uses: codecov/codecov-action@v3.1.4 - with: - # Repository upload token - get it from codecov.io. Required only for private repositories - token: # optional - # Path to coverage file to upload - file: # optional - # Comma-separated list of files to upload - files: # optional - # Directory to search for coverage reports. - directory: # optional - # Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome) - flags: # optional - # Specify the path of a full Codecov report to re-upload - full_report: # optional - # The commit SHA of the parent for which you are uploading coverage. If not present, the parent will be determined using the API of your repository provider. When using the repository providers API, the parent is determined via finding the closest ancestor to the commit. - commit_parent: # optional - # Don't upload files to Codecov - dry_run: # optional - # Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON) - env_vars: # optional - # Specify whether or not CI build should fail if Codecov runs into an error during upload - fail_ci_if_error: # optional - # Comma-separated list, see the README for options and their usage. Options include `network`, `fixes`, `search`. - functionalities: # optional - # Run with gcov support - gcov: # optional - # Extra arguments to pass to gcov - gcov_args: # optional - # gcov executable to run. Defaults to gcov - gcov_executable: # optional - # Paths to ignore during gcov gathering - gcov_ignore: # optional - # Paths to include during gcov gathering - gcov_include: # optional - # Move discovered coverage reports to the trash - move_coverage_to_trash: # optional - # User defined upload name. Visible in Codecov UI - name: # optional - # Specify a filter on the files listed in the network section of the Codecov report. Useful for upload-specific path fixing - network_filter: # optional - # Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing - network_prefix: # optional - # Override the assumed OS. Options are aarch64 | alpine | linux | macos | windows. - os: # optional - # Specify the branch name - override_branch: # optional - # Specify the build number - override_build: # optional - # Specify the commit SHA - override_commit: # optional - # Specify the pull request number - override_pr: # optional - # Specify the git tag - override_tag: # optional - # Used when not in git/hg project to identify project root directory - root_dir: # optional - # Specify the slug manually (Enterprise use) - slug: # optional - # Run with swift coverage support - swift: # optional - # Specify the swift project to speed up coverage conversion - swift_project: # optional - # The upstream http proxy server to connect through - upstream_proxy: # optional - # Change the upload host (Enterprise use) - url: # optional - # Specify whether the Codecov output should be verbose - verbose: # optional - # Specify which version of the Codecov Uploader should be used. Defaults to `latest` - version: # optional - # Directory in which to execute codecov.sh - working-directory: # optional - # Run with xcode support - xcode: # optional - # Specify the xcode archive path. Likely specified as the -resultBundlePath and should end in .xcresult - xcode_archive_path: # optional - # Add additional uploader args that may be missing in the Action From 236b26a84ed99a3c5203ef9b81e4324f51bd5bc6 Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Tue, 13 Jun 2023 18:02:49 +0200 Subject: [PATCH 05/13] create a report to upload --- .github/workflows/ci.yml | 14 +++++++++++++- tox.ini | 7 ++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4e2740af..60930f99d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,10 +37,22 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions codecov + python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions - name: "Run tox targets for ${{ matrix.python-version }}" if: ${{ matrix.tox-test == 'default' }} # Fake a TTY shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"' run: "python -m tox" + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + directory: ./coverage/reports/ + env_vars: OS,PYTHON + fail_ci_if_error: true + files: ./coverage1.xml,./coverage2.xml,!./cache + flags: unittests + name: codecov-umbrella + verbose: true + diff --git a/tox.ini b/tox.ini index 80d30619f..b43f3fdd7 100644 --- a/tox.ini +++ b/tox.ini @@ -16,6 +16,7 @@ passenv = TRAVIS_PULL_REQUEST TRAVIS_REPO_SLUG deps = + coverage pytest freezegun !py36: vdirsyncer @@ -26,7 +27,11 @@ deps = hypothesis commands = - py.test {posargs} + coverage run -m pytest {posargs} + sh -c "coverage combine -q .tox/.coverage.* && coverage xml || true && coverage report" +allowlist_externals = + coverage + sh [gh-actions] python = From 5588c5450b851d6d84343f101e6da59fe7117866 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 16:03:22 +0000 Subject: [PATCH 06/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60930f99d..cb5c51dad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,4 +55,3 @@ jobs: flags: unittests name: codecov-umbrella verbose: true - From 24d5589b93b8df502d2758c73c013a279f9fd44a Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Tue, 13 Jun 2023 18:06:03 +0200 Subject: [PATCH 07/13] fix me --- tox.ini | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tox.ini b/tox.ini index b43f3fdd7..aa2168cc8 100644 --- a/tox.ini +++ b/tox.ini @@ -7,14 +7,8 @@ ignore_errors = True passenv = LANG CI - TRAVIS - TRAVIS_BRANCH - TRAVIS_BUILD_ID - TRAVIS_COMMIT - TRAVIS_JOB_ID - TRAVIS_JOB_NUMBER - TRAVIS_PULL_REQUEST - TRAVIS_REPO_SLUG +set_env = + COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}} deps = coverage pytest From 65661aa4e67481e560509d60618fb2abfa2f7b57 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 16:06:32 +0000 Subject: [PATCH 08/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index aa2168cc8..612cfb2c3 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ ignore_errors = True passenv = LANG CI -set_env = +set_env = COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}} deps = coverage From b3152df64f269ca7af26369863377ef94362750e Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Tue, 13 Jun 2023 18:08:51 +0200 Subject: [PATCH 09/13] fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb5c51dad..d1a14ae52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: directory: ./coverage/reports/ env_vars: OS,PYTHON fail_ci_if_error: true - files: ./coverage1.xml,./coverage2.xml,!./cache + files: ./coverage.xml flags: unittests name: codecov-umbrella verbose: true From 0e76773bd0f23a8f8aa7d69e839865133f8fb52a Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Tue, 13 Jun 2023 18:13:04 +0200 Subject: [PATCH 10/13] fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1a14ae52..3432f2737 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - directory: ./coverage/reports/ + directory: . env_vars: OS,PYTHON fail_ci_if_error: true files: ./coverage.xml From 4efdebdba1235639b8328de18e4559be346c4643 Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Tue, 13 Jun 2023 18:24:14 +0200 Subject: [PATCH 11/13] fix --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 612cfb2c3..773b1fd88 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] envlist = {py38,py310,py311}-tests,py39-tests-{pytz2018.7,pytz_latest} skip_missing_interpreters = True +work_dir = {env:TOX_WORK_DIR:.tox} [testenv] ignore_errors = True From 46338fce24e27b66fbd2b74dab514b833b69001a Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Tue, 13 Jun 2023 18:29:27 +0200 Subject: [PATCH 12/13] fix --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3432f2737..7b9e5d920 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,10 @@ jobs: # Fake a TTY shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"' run: "python -m tox" + coverage: + name: "Upload coverage" + runs-on: "ubuntu-latest" + steps: - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: From 2dba9704b49a2485ddefcb3cf5b184dd3157efbe Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Tue, 13 Jun 2023 18:31:51 +0200 Subject: [PATCH 13/13] fix --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b9e5d920..fb8a735fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,7 @@ jobs: coverage: name: "Upload coverage" runs-on: "ubuntu-latest" + needs: tests steps: - name: Upload coverage to Codecov uses: codecov/codecov-action@v3