diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 503980e..b0d0b1c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -76,8 +76,13 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install core run: | + pip install poetry + poetry config virtualenvs.create false git clone https://github.com/stackitcloud/stackit-sdk-python-core.git core - cd core;make install-dev; + cd core;make install; + - name: Install sdk + working-directory: ./sdk-repo-updated + run: make install-dev - name: Lint working-directory: ./sdk-repo-updated run: make lint diff --git a/.github/workflows/sdk-pr.yaml b/.github/workflows/sdk-pr.yaml index 90a40b3..3de0c7a 100644 --- a/.github/workflows/sdk-pr.yaml +++ b/.github/workflows/sdk-pr.yaml @@ -12,7 +12,7 @@ env: jobs: main-go: - name: [Go] Update SDK Repo + name: "[Go] Update SDK Repo" runs-on: ubuntu-latest steps: - name: Install SSH Key @@ -40,7 +40,7 @@ jobs: run: | scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" main-python: - name: [Python] Update SDK Repo + name: "[Python] Update SDK Repo" runs-on: ubuntu-latest steps: - name: Install SSH Key diff --git a/scripts/generate-sdk/languages/python.sh b/scripts/generate-sdk/languages/python.sh index c72d84f..fd0bbed 100644 --- a/scripts/generate-sdk/languages/python.sh +++ b/scripts/generate-sdk/languages/python.sh @@ -124,6 +124,24 @@ generate_python_sdk() { cp -r ${sdk_services_backup_dir}/${service}/src/wait ${SERVICES_FOLDER}/${service}/src/wait fi + # If the service has a README.md file, move them inside the service folder + if [ -f ${sdk_services_backup_dir}/${service}/README.md ]; then + echo "Found ${service} \"README.md\" file" + cp -r ${sdk_services_backup_dir}/${service}/README.md ${SERVICES_FOLDER}/${service}/README.md + fi + + # If the service has a pyproject.toml file, move them inside the service folder + if [ -f ${sdk_services_backup_dir}/${service}/pyproject.toml ]; then + echo "Found ${service} \"pyproject.toml\" file" + cp -r ${sdk_services_backup_dir}/${service}/pyproject.toml ${SERVICES_FOLDER}/${service}/pyproject.toml + fi + + # If the service has a poetry.lock file, move them inside the service folder + if [ -f ${sdk_services_backup_dir}/${service}/poetry.lock ]; then + echo "Found ${service} \"poetry.lock\" file" + cp -r ${sdk_services_backup_dir}/${service}/poetry.lock ${SERVICES_FOLDER}/${service}/poetry.lock + fi + # If the service has a CHANGELOG file, move it inside the service folder if [ -f ${sdk_services_backup_dir}/${service}/CHANGELOG.md ]; then echo "Found ${service} \"CHANGELOG\" file"