Skip to content

feat: add python sdk #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 53 additions & 3 deletions .github/workflows/sdk-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ env:
JAVA_VERSION: "11"

jobs:
main:
name: Update SDK Repo
main-go:
name: [Go] Update SDK Repo
runs-on: ubuntu-latest
steps:
- name: Install SSH Key
Expand Down Expand Up @@ -49,4 +49,54 @@ jobs:
GH_REPO: "stackitcloud/stackit-sdk-go"
GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }}
run: |
scripts/sdk-create-pr.sh "oas-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
scripts/sdk-create-pr.sh "oas-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
runs-on: ubuntu-latest
steps:
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ vars.SSH_KNOWN_HOSTS }}
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ env.JAVA_VERSION }}
- name: Checkout generator repo
uses: actions/checkout@v3
with:
repository: "stackitcloud/stackit-sdk-generator"
ref: "main"
- name: Build
uses: ./.github/actions/build
with:
go-version: ${{ env.GO_VERSION }}
- name: Download OAS
run: make download-oas
- name: Generate SDK
run: make generate-sdk LANGUAGE=python
- uses: actions/checkout@v3
with:
repository: "stackitcloud/stackit-sdk-python-core"
ref: "main"
path: 'python-core'
- name: Install Python SDK Core
working-directory: 'python-core'
run: make install
- name: Install Python SDK
working-directory: ./sdk-repo-updated
run: make install-dev
- name: Lint Python
working-directory: ./sdk-repo-updated
run: make lint
- name: Test Python
working-directory: ./sdk-repo-updated
run: make test
- name: Push Python SDK
env:
GH_REPO: "stackitcloud/stackit-sdk-python"
GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }}
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 }})" "[email protected]:stackitcloud/stackit-sdk-python.git" "python"