From 924230a0fb3760e349186ca204f9913e40ecb236 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 26 Jan 2021 16:41:28 +0000 Subject: [PATCH 1/3] FIX: Ensure version consistency check doesn't fail on main branch --- .github/workflows/scripts/check-version-consistency.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/scripts/check-version-consistency.py b/.github/workflows/scripts/check-version-consistency.py index 62ae22d..7ab9453 100644 --- a/.github/workflows/scripts/check-version-consistency.py +++ b/.github/workflows/scripts/check-version-consistency.py @@ -6,7 +6,7 @@ PACKAGE_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) -class NotAVersionBranchException(Exception): +class NotAReleaseBranchException(Exception): pass @@ -33,6 +33,9 @@ def release_branch_version_matches_setup_version(setup_version, full_branch_name :raise NotAVersionBranchException: :return bool: """ + if not full_branch_name.startswith("release"): + raise NotAReleaseBranchException(f"The branch is not a release branch: {full_branch_name!r}.") + try: branch_type, branch_name = full_branch_name.split("/") except ValueError: @@ -40,9 +43,6 @@ def release_branch_version_matches_setup_version(setup_version, full_branch_name f"The branch name must be in the form 'branch_type/branch_name'; received {full_branch_name!r}" ) - if branch_type != "release": - raise NotAVersionBranchException(f"The branch is not a release branch: {full_branch_name!r}.") - return branch_name == setup_version @@ -63,6 +63,6 @@ def release_branch_version_matches_setup_version(setup_version, full_branch_name ) sys.exit(1) - except NotAVersionBranchException as e: + except NotAReleaseBranchException as e: print(e.args[0]) sys.exit(0) From ea94a7282320fa9e6985e3c48988188f02f9933f Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Mon, 1 Feb 2021 11:49:45 +0000 Subject: [PATCH 2/3] OPS: Update version number --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 868653f..67c136d 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( name="twined", - version="0.0.15", + version="0.0.16", py_modules=[], install_requires=["jsonschema ~= 3.2.0", "python-dotenv"], url="https://www.github.com/octue/twined", From 039763e2968fe4e4e17cb0acb87d79c645a9b676 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Mon, 1 Feb 2021 11:54:05 +0000 Subject: [PATCH 3/3] OPS: Allow skipping of CI tests based on commit comment --- .github/workflows/python-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 9582311..66a5e85 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -19,6 +19,7 @@ jobs: tests: runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '#skip_ci_tests')" env: USING_COVERAGE: '3.8' strategy: