From 8ef6a3f7701ddd876bc13d08a232fe4823e47cba Mon Sep 17 00:00:00 2001 From: Amichai Date: Sun, 8 Sep 2024 13:16:38 +0300 Subject: [PATCH] Remove Circle, fix TTY issue in verify script --- .circleci/config.yml | 127 ------------------------------------------- verify.sh | 2 +- 2 files changed, 1 insertion(+), 128 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 3c57f08..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,127 +0,0 @@ -### ============================================================= -### This configuration file is used by CircleCI build server -### https://circleci.com/docs/sample-config -### ============================================================= -version: 2.1 - -parameters: - docker_image_for_publishing: - # python 3.10 is the latest supported version - description: "Docker image to use for the build" - type: string - default: cimg/python:3.12 - -references: - install_poetry: &install_poetry - - run: - name: Install Poetry - command: | - # in old images we need to remove existing poetry - rm -rf $HOME/.poetry/bin/poetry - sudo curl -sSL https://install.python-poetry.org | python3 - - poetry --version - - install_project_dependencies: &install_project_dependencies - - run: - name: Install Project Dependencies - command: | - poetry install --no-interaction --no-ansi --no-root - - poetry_build: &poetry_build - - run: - name: Build Package - command: | - poetry build - - version_tag_regex: &version_tag_regex - /^v\d+\.\d+\.\d+$/ # version regex vx.x.x (i.e. v1.2.3) - - # step only run if is match the filter - # the step run on all branches - tag_filter: &tag_filter - filters: - tags: - only: *version_tag_regex - - -jobs: - run-unit-tests: - parameters: - pythonversion: - type: string - docker: - - image: cimg/python:<< parameters.pythonversion >> - steps: - - checkout - - <<: *install_poetry - - <<: *install_project_dependencies - - run: - name: Run Unit Tests - command: | - mkdir test-results - poetry run python -m pytest --junitxml=test-results/junit.xml -v tests - - store_test_results: - path: test-results - verify: - machine: - image: default - steps: - - checkout - - run: - name: Verify - command: | - ./verify.sh - - publish-to-test-pypi: - docker: - - image: << pipeline.parameters.docker_image_for_publishing >> - steps: - - checkout - - <<: *poetry_build - - run: - name: Publish Package To Test PyPI - command: | - poetry config repositories.testpypi https://test.pypi.org/legacy/ - poetry publish -u __token__ -p ${PYPI_TEST_TOKEN} -r testpypi - - - publish-to-pypi: - docker: - - image: << pipeline.parameters.docker_image_for_publishing >> - steps: - - checkout - - <<: *poetry_build - - run: - name: Publish Package To PyPI - command: | - poetry publish -u __token__ -p ${PYPI_TOKEN} - -workflows: - build_and_release: - jobs: - - run-unit-tests: - <<: *tag_filter # we add it for the publish-to-pypi step - matrix: - parameters: - pythonversion: ["3.8", "3.9", "3.10", "3.11", "3.12"] - name: run-unit-tests-<< matrix.pythonversion >> - - verify: - <<: *tag_filter # we add it for the publish-to-pypi step - # comment out the publish-to-test-pypi step until we automate version bumping - # - publish-to-test-pypi: - # requires: - # - run-unit-tests - # - verify - # filters: - # branches: - # only: master - - publish-to-pypi: - requires: - - run-unit-tests - - verify - filters: - tags: - only: *version_tag_regex - branches: - ignore: /.*/ - \ No newline at end of file diff --git a/verify.sh b/verify.sh index e45eef3..5d7500c 100755 --- a/verify.sh +++ b/verify.sh @@ -6,7 +6,7 @@ set -e # Script to run extra verifications # Verify that code-gen.sh doesn't generate a diff -bash -x ./gen-code.sh +bash ./gen-code.sh # Removed the '-x' for verbosity in CI # we diff only the code DIFF_OUT=$(git diff -- demisto_client)