Skip to content

Commit

Permalink
disable verification
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagharsh Kandilian committed Sep 17, 2020
1 parent 53587c8 commit 204f0b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 67 deletions.
46 changes: 4 additions & 42 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,18 @@ orbs:
workflows:
build_and_deploy:
jobs:
- untagged_test:
- test:
context: test
- tagged_test:
context: test
filters:
tags:
only: /.*/
- deploy:
context: pypi
requires:
- tagged_test
# requires:
# - test
filters:
tags:
only: /^\d+\.\d+\.\d+/

jobs:
untagged_test:
docker:
- image: circleci/python:3.8
steps:
- checkout
- run:
name: "Prep Google credentials"
command: |
mkdir -p "/home/circleci/.secrets/"
echo "$GOOGLE_APPLICATION_CREDENTIALS" | base64 --decode > "/home/circleci/.secrets/gcs.json"
- run:
name: "Collecting requirements"
command: |
pip install pytest
pip install -r requirements.txt
pip install -e .
- run:
name: "Running tests"
command: |
export GOOGLE_APPLICATION_CREDENTIALS=/home/circleci/.secrets/gcs.json
pytest ./
- store_test_results:
path: test-reports
- store_artifacts:
path: test-reports
- slack/status:
fail_only: true
webhook: $SLACK_WEBHOOK

tagged_test:
test:
docker:
- image: circleci/python:3.8
steps:
Expand Down Expand Up @@ -85,10 +51,6 @@ jobs:
- image: circleci/python:3.8
steps:
- checkout
- run:
name: "Verify git tag vs. version"
command: |
python setup.py verify
- run:
name: "Init .pypirc"
command: |
Expand Down
26 changes: 1 addition & 25 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,6 @@
with open(os.path.join(this_directory, "requirements.txt"), "r") as f:
requirements = f.readlines()


class VerifyVersionCommand(install):
"""Custom command to verify that the git tag matches our version"""

description = "verify that the git tag matches our version"

def run(self):
tag = os.environ.get("CIRCLE_TAG")

print(tag)
print(type(tag))
print(VERSION)
print(type(VERSION))

if tag != VERSION:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, VERSION
)
sys.exit(info)


setup(
name=project,
version=VERSION,
Expand All @@ -59,8 +38,5 @@ def run(self):
"hub-dev = hub.cli.dev:cli",
]
},
tests_require=["pytest", "mock>=1.0.1"],
cmdclass={
"verify": VerifyVersionCommand,
},
tests_require=["pytest", "mock>=1.0.1"]
)

0 comments on commit 204f0b2

Please sign in to comment.