From 577d0c074ee70cb69f4b72a5fd2b984e5aaf5e9c Mon Sep 17 00:00:00 2001 From: David Ekchajzer Date: Fri, 13 Dec 2024 10:41:03 +0100 Subject: [PATCH] Delete .github/workflows/build_client.yml --- .github/workflows/build_client.yml | 66 ------------------------------ 1 file changed, 66 deletions(-) delete mode 100644 .github/workflows/build_client.yml diff --git a/.github/workflows/build_client.yml b/.github/workflows/build_client.yml deleted file mode 100644 index 5adfb941..00000000 --- a/.github/workflows/build_client.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: build_client_sdk - -# Disable automatic triggring of this legacy workflow (replaced by build_client_sdk_with_poetry) -on: workflow_dispatch - -# on: -# push: -# tags: -# - '*' -# paths-ignore: -# - 'docs/**' -# - 'test/**' -# - 'README.md' -# - 'CHANGELOG.md' -# - 'LICENSE' -# - 'Dockerfile' -# - 'CITATION' -# - 'book.toml' -# - 'CONTRIBUTING.md' - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - name: build_python_client_sdk - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Install python dependencies - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - name: Install requirements - run: | - sudo apt update -y - sudo apt install docker.io containerd runc wget python3-pip -y - pip3 install pipenv twine - - name: Run the API locally - run: | - python3 setup.py sdist - API_VERSION=$(cat boaviztapi/__init__.py | cut -d "'" -f 2) - echo "API_VERSION=${API_VERSION}" >> $GITHUB_ENV - docker build --build-arg VERSION=${API_VERSION} . --file Dockerfile --tag boaviztapi:latest - docker run -p "5000:5000" --name=boaviztapi -tid boaviztapi:latest - - name: Get logs from the API container in case of a failure - run: | - docker logs boaviztapi - - name: Get the openapi.json definition and generate the code - run: | - while [[ ! $(docker ps | grep boaviztapi) ]]; do sleep 1; echo "Waiting for BoaviztAPI container to boot"; done - wget http://127.0.0.1:5000/openapi.json - docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate -i /local/openapi.json -g python -o /local/boaviztapi_sdk --package-name boaviztapi_sdk - - name: Build the pip package and push it - run: | - sudo chown -R $(whoami) boaviztapi_sdk - SDK_VERSION=${{ env.API_VERSION }} - echo "SDK_VERSION == ${SDK_VERSION}" - cd boaviztapi_sdk - sed -i "s/^VERSION.*/VERSION = \"${SDK_VERSION}\"/" setup.py - sed -i "s/^ long_description=.*/long_description='Python SDK for boaviztAPI'/" setup.py - sed -i 's/ #.*//' setup.py - sed -i 's/ """.*//' setup.py - python3 setup.py sdist - pipenv run twine upload --repository pypi --username __token__ --password ${{ secrets.BPETIT_SECRET_PYPI_TOKEN }} dist/*